Forum Stats

  • 3,815,687 Users
  • 2,259,067 Discussions
  • 7,893,207 Comments

Discussions

Exception handling in ODI Load Plan not working

user12251389
user12251389 Member Posts: 333 Blue Ribbon
edited Oct 19, 2021 6:21PM in Data Integrator

I have package where i have grouped mappings and try to run them sequentially. This package is without notification.

I have created another package where i want to generate beep when exception occured. This package is with notification.


The variable Session_ID has below query:

SELECT <%=odiRef.getSession("SESS_NO")%> FROM dual

I have generated scenario based on both this packages.

When i run load plan, the process is getting stopped as soon as it receives exception in package for second mapping. I want to continue my process and run all the mappings in package even if the exception occured.

I dont know what step i am doing wrong.

Tagged:
«1

Answers

  • user12251389
    user12251389 Member Posts: 333 Blue Ribbon

    @Rodrigo Radtke Souza do you have any idea on this ODI issue ? Thanks!

  • Rodrigo Radtke Souza
    Rodrigo Radtke Souza Member Posts: 212 Gold Badge

    There is no issue in ODI. ODI is behaving in the way that you designed. If you want to execute all other mappings, even when one of them fails, you will need to do the following:

    Does that make sense?

  • user12251389
    user12251389 Member Posts: 333 Blue Ribbon
    edited Oct 19, 2021 6:11PM

    @Rodrigo Radtke Souza thanks i will try the same but do you think the other steps looks fine in Load Plan ?

    I checked the logic from below article. In this article the process will stop entirely if any exception occured in package which i dont want:

    https://www.ateam-oracle.com/post/exceptions-handling-and-notifications-in-odi

  • Rodrigo Radtke Souza
    Rodrigo Radtke Souza Member Posts: 212 Gold Badge

    If you do as the picture that I sent, it will never stop, even with errors. But this is somehow a "poor" design, since it will also not trigger any notification. If you look in Operator later, it will have a warning sign, but the exception will not be triggered in the Load Plan. If you want to do that, you will need to generate one scenario out of each mapping and add it as a step in the load plan by themselves.

    Does that make sense?

  • user12251389
    user12251389 Member Posts: 333 Blue Ribbon

    @Rodrigo Radtke Souza thanks it actually makes sense ..now i can see in operator there is warning but in load plan no exception....because in future i want to take the sendemail component and try to get notification via email for any mapping failed then i think in this case i have to generate scenario for each mapping and add it as a step in the load plan...this is also very tedious because i have like 30 mappings now but it looks like there is no alternative better solution than this..

  • user12251389
    user12251389 Member Posts: 333 Blue Ribbon

    @Rodrigo Radtke Souza I have one question... with the Ko option as we said it might be poor design and we cannot send notification..And with the second solution where we need to create one scenario for each mapping and add it in load plan but i think the problem with this approach is we also have to create package for each mapping because in package we have to use variable Session_ID and also we have to use OdiSendMail component so that in case of any failure in mapping we can send email notification ?

    Package for every mapping also bit poor design ?

  • Marco Fris
    Marco Fris Member Posts: 130 Bronze Badge

    The way we do it:

    We declare a numeric variable and set it to zero.

    All the KO exits from mappings or procedures go to an Increment Variable step, that step goes to the next mapping/proc. At the end there is an Evaluate Variable step, if it finds a non-zero variable it goes into whatever error handling you have built.

    Thusly:



  • user12251389
    user12251389 Member Posts: 333 Blue Ribbon

    @Marco Fris i think this solution looks bit complicated because we have to use intermediate variable between each mapping and if we have for example 30 mapping then it makes more complicated...for example we can also use below approach but it might be poor design:


  • Marco Fris
    Marco Fris Member Posts: 130 Bronze Badge

    The difference between your design and mine is 4 steps in total.

    Anyway: if you want the load plan to notice a failure (which I thought was the original question) you will have to exit the package with a failure. Beeping doesn't do that (and it doesn't mean anything when you run through an agent instead of from Studio).

  • user12251389
    user12251389 Member Posts: 333 Blue Ribbon

    @Marco Fris actually there is no restriction on using Load Plan ...i can also use other solution :) also.... but from your previous solution i may be misunderstood i thought we have to create variable and KO for each intermediate mapping ? Just my approach is bit poorly design which i want to avoid :) Can you please explain in brief ? Thanks!