0

I am looking for help to be able to execute a python script on oracle data integrator (ODI) I have not found any documentation for this process I would appreciate if someone can help me with this process

I don't know where in ODI I could do this type of execution

1 Answer 1

2

Essentially ODI doesn't support Python directly but there are a couple of things you can do. The things to consider are:

  • where you need to run the code
  • what you want the code to do
  • how integrated into ODI do you need it to be

Jython

ODI does support Jython which is a Java implementation of Python. This can be embedded within procedures and Knowledge Modules which allows you to (relatively) easily make use of the ODI metadata. It isn't particularly friendly to code or debug but is functional and powerful, you get access to ODI logging etc.

Whilst this is possible I would look to do this is Groovy rather than Jython as it is much cleaner and simpler

Shell Script

If your python script is already there and is completely stand alone you can use an OdiOsCommand inside of a package. You would need an agent installed on the box on which you want to run the script and you can just do something like

python /path/mypythonscript.py

just as you would from the command line.

This is simple enough but the integration into ODI is very limited. It will handle errors just like a shell script (so handled exceptions will be swallowed and lost) and any parameters you want to pass will need to be via the command line.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.