4

I have thousands of mappings created in ODI. I need to execute those, but executing them one by one doesn't seem to be a feasible option.

I'm trying to write a groovy script that could fetch a list of all the mappings, iterate through each of the mappings. I'm able to achieve this, but I'm unable to figure out how to run the given mapping.

Here is my script:

def fm = ((IMappingFinder) tme.getFinder(Mapping.class))         

def mappingList = fm.findAll().findAll{w -> w.getProject().getCode() == 'STOO'}
if (mappingList == null){
  println "Map is null"
}

ms=mappingList.iterator()
while(ms.hasNext()){
    ms_i = ms.next()
    println ms_i.getName() // INSERT CODE TO EXECUTE MAPPING HERE
} 

This script prints the mapping name, I just need a way to execute it. Pls help!

1 Answer 1

3

The class RemoteRuntimeAgentInvoker from oracle.odi.runtime.agent.invocation will let you start a scenario or a load plan.

For an execution on the local agent, it can be done with the class RuntimeAgent from oracle.odi.runtime.agent. But you won't be able to run Load Plans on the local agent, it can only run on a remote agent.

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.