Introduction to the Substitution API 2-11
As all filters and joins start with an AND, the WHERE clause of the SELECT statement starts with a condition that is always true 1=1.
2.7 Working with Datasets
Oracle Data Integrator supports datasets. Each dataset represents a group of joined and filtered sources tables, with their mappings. Datasets are merged into the target
datastore using set-based operators UNION, INTERSECT, etc at the integration phase.
During the loading phase, the LKM always works on one dataset. Duringthe integration phase, when all datasets need to merged, certain odiRef APIs that support
working on a specific dataset are called using an index that identifies the dataset.
The following example explains how this dataset merging is done. for int i=0; i odiRef.getDataSetCount; i++{
=odiRef.getDataSeti, Operator select =odiRef.getUserExitOPTIMIZER_HINT
=odiRef.getPopDISTINCT_ROWS =odiRef.getColListi,, [EXPRESSION], ,\n\t, , INS or UPD and TRG
and REW, if odiRef.getDataSeti, HAS_JRN.equals1 {
JRN_FLAG IND_UPDATE } else {
I IND_UPDATE }
from =odiRef.getFromi where1=1
=odiRef.getJoini =odiRef.getFilteri
=odiRef.getJrnFilteri =odiRef.getGrpByi
=odiRef.getHavingi }
A Java For loop iterates over the datasets. The number of datasets is retrieved using the getDataSetCount method. For each dataset, a SELECT statement is issued, each
statement separated from the previous one by the dataset’s set-based operator retrieved using the getDataSet method.
The select statement is build as in Generating the Source Select Statement
, except that each method call is parameterized with i, the index of the dataset being processed. For
example, getFromi generates the from statement for the dataset identified by the value of i.
All the methods that support a parameter for the dataset index also support a syntax without this index value. Outside an IKM, then should be used without the dataset
index. Within an IKM, if used without the dataset index, these method address the first dataset. This syntax is backward compatible with previous Oracle Data Integrator
interfaces and knowledge modules.
2.8 Obtaining Other Information with the API
The following methods provide additional information which may be useful:
2-12 Oracle® Fusion Middleware Knowledge Module Developer’s Guide for Oracle Data Integrator
2.9 Advanced Techniques for Code Generation