Automating ODI Topology Creation (Data Servers, Physical/Logical Schemas) using Groovy SDK in Oracle Data Integrator 12c
13:46 29 Dec 2025

Using Oracle Data Integrator (ODI 12.2.1.x) as middleware in our environment. For incoming requests (such as new topology definitions or user definitions), we currently manually configure topology elements in the Topology Manager:

- Creating Data Servers
- Creating Physical Schemas
- Creating and mapping Logical Schemas to contexts
- Configuring across multiple work repositories and agents (we have 3 agent/terminal servers)

This process is time-consuming as we need to open repositories one by one and repeat the steps.

I'm having trouble with:

  • Properly creating and mapping logical schemas to physical schemas in specific contexts

  • Handling multiple work repositories automatically

  • Agent configuration if needed

    Here is a basic Groovy script outline I'm trying to use (connecting to the master repository):

```groovyimport oracle.odi.core.OdiInstanceimport oracle.odi.core.persistence.transaction.ITransactionStatusimport oracle.odi.domain.topology.OdiDataServerimport oracle.odi.domain.topology.OdiPhysicalSchemaimport oracle.odi.domain.topology.OdiLogicalSchemaimport oracle.odi.domain.project.OdiContext// Connection to ODI instance (master repo)OdiInstance odiInstance = // ... connection logic with credentials ...ITransactionStatus trans = odiInstance.getTransactionManager().beginTransaction()OdiDataServer dataServer = new OdiDataServer(odiInstance.getMasterRepository(), "NEW_DATA_SERVER")dataServer.setTechnologyName("Oracle")dataServer.setHost("host_name")dataServer.setUser("username")dataServer.setPassword("password")OdiPhysicalSchema physSchema = dataServer.createPhysicalSchema("SCHEMA_NAME")physSchema.setSchemaName("SCHEMA_NAME")physSchema.setWorkSchemaName("WORK_SCHEMA")// Logical schema and context mapping part is where I'm stucktrans.commit()odiInstance.close()

Is it possible to automate the creation and configuration of topology objects (OdiDataServer, OdiPhysicalSchema, OdiLogicalSchema, context mappings, etc.) using the ODI SDK with Groovy scripts? Ideally, we want this automation to be triggered when a new request arrives (e.g., via a ticket system like SMART), possibly integrated with Ansible or a simple script.

I have seen examples of automating mappings, scenarios, and load plans using Groovy SDK, but I couldn't find clear examples specifically for topology objects.

Are there any working examples, best practices, or sample scripts for automating topology creation using ODI SDK? Is integrating this with Ansible (to run the Groovy script on ODI servers) a viable approach?Any help or pointers to documentation/examples would be greatly appreciated! Thanks!

groovy automation ansible etl oracle-data-integrator