Executing a Data Integration Task using Task Names

David Allan
1 min readJul 24, 2020

The example here on executing a task using the Python SDK hard-wired the application key and the published task key, these can be retrieved via the console, but that’s not very convenient.

You can use some of the other operations in the SDK to get the keys based on the application name and the task name. The code below lists applications (list_application), filters on the applications using the name of the application “MY_DEMO_APP”, then when the key for the application is retrieved, I get the key for the published task object using the list_published_objects operation and the name of the task.

appName="MY_DEMO_APP"taskName="OSTask"applist = dip.list_applications(wsid,fields="metadata", name=appName).data.itemsapplication=applist[0].keypubobjslist = dip.list_published_objects(wsid,application_key=application, name=taskName).data.itemstask=pubobjslist[0].key

This makes it simpler for executing existing tasks rather than hard-wiring the keys as before.

Explore more of the Data Integration SDKs, you can find information about the REST APIs here;

See some of the recent blogs from the team below, this summarizes a bunch of interesting posts;

https://blogs.oracle.com/dataintegration/get-going-with-oracle-cloud-infrastructure-data-integration

--

--

David Allan
David Allan

Written by David Allan

Architect at @Oracle The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

No responses yet