Executing all tasks in Application using OCI PLSQL SDK

David Allan
2 min readMar 30, 2021

--

In this example we will see how we can execute all OCI Data Integration tasks published to an application using the OCI PLSQL SDK. The PLSQL function below takes the Data Integration application key as a parameter and lists all the published tasks, executing each one. This is a follow on from the earlier post here where a single task was executed.

For example the application APP_SANITY below has 2 tasks published, I can execute all tasks here easily from PLSQL with some code;

The code is below for how to get all tasks published to the application and create a task run / execute each one;

The LIST_PUBLISHED_OBJECTS call will return a response which also includes a response body, the response body has a PLSQL collection (items), you can describe the type returned to see the properties;

RESPONSE_BODY       C##CLOUD$SERVICE.DBMS_CLOUD_OCI_DATAINTEGRATION_PUBLISHED_OBJECT_SUMMARY_COLLECTION_T()
HEADERS PUBLIC.JSON_OBJECT_T()
STATUS_CODE NUMBER

then describe the RESPONSE_BODY type and see its members, there is an ITEMS member which is a collection which you can then iterate over in PLSQL, get the members of the published object type and do whatever you want.

Very cool, and what makes it better is that as new functionality is added into the OCI Data Integration service and any other service, the ADBs are automatically updated.

See here for more information on OCI Data Integration;

Thanks for reading! See other posts for interesting use cases and snippets….

--

--

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