In the Designer Navigator, expand the Models tree and expand the model or In the Property Inspector, select the Context for this datastore if you want to target

Working with Integration Interfaces 11-9 – The generated sub-select syntax can be either a standard sub-select syntax default behavior or the customized syntax from the IKM used in the first interface. – All IKM commands except the one that defines the derived-table statement option Use current command for Derived Table sub-select statement are ignored. This limitation causes, for example, that temporary index management is not supported. The source datastores of an interface can be filtered during the loading process and must be put in relation through joins. Joins and filters can be automatically copied from the model definitions and can also be defined for the interface. A lookup is a datastore from a model or the target datastore of an interface - called the lookup table - associated to a source datastore - the driving table - via a join expression and from which data can be fetched and used into mappings. The lookup data is used in the mapping expressions. Lookup tables are added with the Lookup Wizard. Depending on the database, two syntaxes can be used for a lookup: ■ SQL Left-Outer Join in the FROM clause : The lookup is processed as a regular source and a left-outer join expression is generated to associate it with its driving table. ■ SQL expression in the SELECT clause : The lookup is performed within the select clause that fetches the data from the lookup table. This second syntax may sometimes be more efficient for small lookup tables.

11.3.4.1 Define the Source Datastores

To add a permanent-type source datastore to an interface:

1. In the Designer Navigator, expand the Models tree and expand the model or

sub-model containing the datastore to be inserted as a source. 2. Select this datastore, then drag it into the Source Diagram. The source datastore appears in the diagram.

3. In the Diagram Property tab of the Property Inspector, modify the Alias of the

source datastore. The alias is used to prefix column names. This is an optional step that improves readability of the mapping, joins and filter expressions.

4. Select the Context for this datastore if you want to source data from this datastore

in a fixed context. By default, the datastore is accessed in the context into which the interface is executed. This is an optional step. 5. If you want to source from a specific partition of this datastore, select the partition or sub-partition defined for this datastore from the list. This is an optional step Caution: If there are in the model filters defined on the datastore, or references between this datastore and datastores already in the diagram, they appear along with the datastore. These references and filters are copied as joins and filters in the interface. They are not links to the references and filters from the model. Therefore, modifying a reference or a filter in a model does not affect the join or filter in the interface, and vice versa. 11-10 Oracle Fusion Middleware Developers Guide for Oracle Data Integrator To add a temporary-type source datastore to an interface:

1. In the Designer Navigator, expand the Projects tree and expand the project

containing the interface to be inserted as a source. 2. Select this interface, then drag it into the Source Diagram. The source datastore appears in the diagram.

3. In the Diagram Property tab of the Property Inspector, modify the Alias of the

source datastore. The alias is used to prefix column names. This is an optional step that improves readability of the mapping, joins and filter expressions. 4. If you want this interface to generate a sub-select corresponding to the loading of the temporary datastore, check the Use Temporary Interface as Derived Table Sub-Select box. If this box is not checked, make sure to run the interface loading the temporary datastore before running the current interface. To delete a source datastore from an interface: 1. Right-click the title of the entity representing the source datastore in the Source Diagram.

2. Select Delete.

3. Click OK in the Confirmation dialog.

The source datastore disappears, along with the associated filters and joins. Note that if this source datastore contained columns that were used in mappings, these mappings will be in error. To display the data or the number for rows of a source datastore of an interface: 1. Right-click the title of the entity representing the source datastore in the Source Diagram.

2. Select Number of Lines to display the number of rows in this source datastore or

Display Data to display the source datastore data. A window containing the number or rows or the data of the source datastore appears.

11.3.4.2 Define Lookups

To add a lookup to an interface:

1. From the Source Diagram toolbar menu, select Add a new Lookup. The Lookup

Tables Wizard opens.

2. In the Lookup Table Wizard select your Driving Table from the left pane. Source

datastores for the current diagram appear here. Note that lookups do not appear in the list.

3. From the tree in the Lookup Table pane on the right, do one of the following:

■ From the Datastores tab, select a datastore from a model to use as a lookup table. Note: If the source datastore is journalized, it is possible to use only the journalized data in the interface flow. Check the Journalized Data Only box in the source datastore properties. A Journalizing filter is automatically created in the diagram. See Chapter 7, Working with Changed Data Capture for more information.