VIGNESH
VIGNESH

Reputation: 3

How to fetch Row counts into a variable in ODI?

I am using Oracle Data Integrator 11g, I have designed a package with 2 interfaces in Oracle Data Integrator. Both the interfaces are inserting some records into target table (Which is in Oracle).

These 2 interfaces are working fine. But i want to capture the record counts from both the interfaces and i have to load those counts into a new audit log table.

Is there any option to do that? If so, kindly reply with your answers.

Upvotes: 0

Views: 5396

Answers (1)

JeromeFr
JeromeFr

Reputation: 1928

The getPrevStepLog() method from the Substitution API allows to retrieve all kind of information on the previous step execution, including the number of rows inserted with the INSERT_COUNT parameter.

If you want to store that value in a variable, you can use this kind of refresh query for the variable and place it just after the interface in the package in refresh mode :

SELECT '<%=odiRef.getPrevStepLog("INSERT_COUNT")%>' FROM DUAL

Upvotes: 1

Related Questions