Using groovy in Oracle Data Integrator (ODI)
ODI supports Groovy among others scripting languages. Groovy is the choice when you want to build very customized solutions on ODI when you need for example a GUI to prepare a workflow.
On my github you can check all the code that I prepared. I will explain the use case.
Creating a Graphical User Interface (GUI) with Groovy
In this script (ODI_SwingBuilder.groovy) I’m creating a simple GUI to read extraction names from a third party tool. That tool provides an API. In the code you will find the different functions to read the output of API calls and after just pick the information that is needed. This is the current architecture:
The GUI has one combo box and two buttons. Extractions can have parameters, that we want to prepare future executions. We click on “Check Parameters”, fill out the parameters with the values we want and after we click “OK”. When we click OK we will update a control table and at the same time creates ODI variables with the same parameter name and values:
Generate ODI DataStores Automatically
In this script, using the same concept of extractions what we do is to create ODI Datastores and Attributes. The DataStore is the extraction name and the attributes are parameters and extraction name as well.
In the code we don’t create the model, we are using an existing one. We ODI APIs to find the model we want to use, create the datastore and attributes.
If you have any doubt, reach out to me through LinkedIn or Medium.
Opinions expressed are solely my own and do not express the views or opinions of my employer Oracle.