Using the substitution passes
We will look here at some of the details of how ODI uses multiple substitution rounds to replace some of the code within KMs with the actual code that will be ultimately executed by the databases and scripts.
Getting ready
To follow along with the examples listed here, you will need an ODI project with at least the following KMs: LKM File to SQL (SQLLDR)
and IKM SQL Control Append
. From a resource perspective, you will need a Flat File
model with at least one file defined and an Oracle model with at least one table.
How to do it...
In your project, rename the
LKM File to Oracle (SQLLDR)
KM, toLKM File to Oracle (SQLLDR) with substitutions
.Edit the
LKM File to Oracle (SQLLDR) with substitutions
KM and within the step identified asCall sqlldr
, insert the following code immediately after the different import statements:# Loading table: <%=odiRef.getTargetTable("TABLE_NAME")%> # Full table name: <%=odiRef.getTable("L", "TARG_NAME", "A")%> # Loading server...