Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Export a Jython variable value into an ODI Variable

2795992Nov 17 2014 — edited Nov 17 2014

Good morning everyone,

I'm using ODI for the first time and I have some simple questions to ask.

I have written a Java program "P" to execute three operations: "X", "Y", "Z". The program returns a String with the result encoded in a JSON format (and never throws an exception).

Now I have the jar of P.

In ODI 12c Demo I have successfully created one procedure with 3 tasks (1st executes X, 2nd Y, 3rd Z). I run P each time with a Jython script that loads the jar and some options from ODI environment and passes them as arguments to the main method.

At the moment Y is executed even if X fails and Z is executed even if Y fails. What I need is to check the operation result: if the result of X equals a certain String then execute Y; if the result of Y equals a certain String then execute Z.

For this reason I've created 3 different procedures, each one with only one (jython) task (one executes X, one Y and one Z).

I have created a new Package and put in it the three procedures.

My problem is on how to connect the three procedures: I need to store the result of one operation and check it before executing the next step.

I have seen that there are "Evaluate Variables", but how can I store in a ODI Global Variable the value contained in a Jython variable (JSON string)?

It seems that ODI Options are read-only (). Any suggestion?

I can't use ODI OS calls. Jython is not strictly necessary.

Thanks for reading.

Gianvito

This post has been answered by Rodrigo Radtke Souza on Nov 17 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 15 2014
Added on Nov 17 2014
8 comments
3,159 views