Create a New Interface

11-8 Oracle Fusion Middleware Developers Guide for Oracle Data Integrator

11.3.3 Define the Datasets

A dataset represents the data flow coming from a group of datastores. Several datasets can be merged into the interface target datastore using set-based operators such as Union and Intersect. The support for datasets as well as the set-based operators supported depend on the capabilities of the staging area’s technology. You can add, remove, and order the datasets of an interface and define the operators between them in the DataSets Configuration dialog. Note that the set-based operators are always executed on the staging area. When designing the integration interface, the mappings for each dataset must be consistent, this means that each dataset must have the same number of target columns mapped. To create a new dataset: 1. In the Source Diagram toolbar click Add Remove DataSet... to display the DataSet Configuration dialog. 2. Click Add New DataSet... A new line is added for the new dataset at the bottom of the list.

3. In the DataSet Name field, give the name of the new dataset. This name will be

displayed in the dataset tab.

4. In the Operator field, select the set-based operator for your dataset. Repeat steps 2

to 4 if you wish to add more datasets.

5. Click Close.

To arrange the order of the datasets:

1. Select a dataset in the DataSet Configuration dialog.

2. Click the Up and Down arrows to move the dataset up or down in the list.

To delete a dataset:

1. Select a dataset in the DataSet Configuration dialog.

2. Click Delete.

11.3.4 Define the Source Datastores and Lookups

The source datastores contain data used to load the target datastore. Two types of datastores can be used as an interface source: datastores from the models and temporary datastores that are the target of an interface. When using a temporary datastore that is the target of another interface as a source or as a lookup table, you can choose: ■ To use a persistent temporary datastore : You will run a first interface creating and loading the temporary datastore, and then a second interface sourcing from it. In this case, you would typically sequence the two interfaces in a package. ■ Not to use a persistent datastore : The second interface generates a sub-select corresponding to the loading of the temporary datastore. This option is not always available as it requires all datastores of the source interface to belong to the same data server for example, the source interface must not have any source sets. You activate this option by selecting Use Temporary Interface as Derived Table on the source. Note the following when using a temporary interface as derived table: 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.