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!
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.