This content has been marked as final. Show 7 replies
In Jython, you can print the results but it wont reflect in ODI operator rather you can re direct your result to print in a text/log file.
If you are so specific then you can try RAISE function in Jython to print your result in operator.
Let me know what you like to do in the procedure.
P.S: Raise will make the process to fail.
Thanks for your reply.
I would like to print out information about processing within the ODI procedure - mainly for test and debug purposes.
Can you please elaborate your requirement with an example if possible? If you want to capture the information about the session/steps you can use OdiPrevStepLog/OdiSession APIs.
Can you please elaborate your requirement with an example if possible?I calculate sums from several tables and evaluate and compare them using java.
For checking my results I would like to display the values of java variable.
As per i said earlier in Jython, you can redirect the output to a text file and check the result, rather you can raise with ignore error to display the result in operator.
How do I redirect the output to a text file?
Can you maybe help me with this?
Hi H,1 person found this helpful
Below is the sample code snippet,
ftrg = open('c:/temp/listdir.txt', 'w')
__mydir = 'c:/odi'
__mylist = os.listdir(mydir)
__for dirOrFile in mylist:
____if os.path.isdir(mydir + os.sep + dirOrFile):
______print >> ftrg, 'DIRECTORY: %s' % dirOrFile
______print >> ftrg, 'FILE: %s' % dirOrFile
The above code will print the list of directories in a specified path to a file listdir.txt.
P.S: If you want to try the code please replace __ with tab. Also, you can have a look at oracledi_jython_reference.pdf for more info.