Creating a Datastore Creating and Reverse-Engineering a Datastore

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

5.3.4.2 References

To create a reference between two datastores:

1. In the Designer Navigator, expand in the Model tree the model and then one of

the datastores into which you want to add the reference.

2. Select the Constraints node, right-click and select New Reference.

3. Enter the Name for the constraint, and then select the Type for the reference. In a

User Reference the two datastores are linked based on column equality. In a Complex User Reference any expression can be used to link the two datastores. A Database Reference is a reference based on column equality that has been reverse-engineered from a database engine.

4. If you want to reference a datastore that exists in a model, select the Model and

the Table that you want to link to the current datastore. 5. If you want to link a table that does not exist in a model, leave the Model and Table fields undefined, and set the Catalog, Schema and Table names to identify your datastore.

6. If you are defining a User or Database reference, in the Columns tab, define the

matching columns from the two linked datastores.

7. If you are defining a Complex User reference, enter in the Expression tab the

expression that relates columns from the two linked datastores.

8. In the Control tab, select whether this constraint should be checked by default in a

Static or Flow check.

9. By clicking the Check button, you can retrieve the number of records that respect

or do not respect this constraint.

10. Select Save from the File main menu.

5.3.4.3 Conditions

To create a condition for a datastore:

1. In the Designer Navigator, expand in the Model tree the model and then one of

the datastores into which you want to add the condition.

2. Select the Constraints node, right-click and select New Condition.

3. Enter the Name for the constraint, and then select the Type for the condition. An

Oracle Data Integrator Condition is a condition that exists only in the model and does not exist in the database. A Database Condition is a condition that is defined in the database and has been reverse-engineered.

4. In the Where field enter the expression that implements the condition. This

expression is a SQL WHERE expression that valid records should respect.

5. Type in the Message field the error message for this constraint.

6. In the Control tab, select whether this constraint should be checked by default in a

Static or Flow check.

7. By clicking the Check button, you can retrieve the number of records that do not

respect this constraint.

8. Select Save from the File main menu.

5.3.4.4 Mandatory Columns

To define mandatory columns for a datastore: Creating and Reverse-Engineering a Model 5-9

1. In the Designer Navigator, expand in the Model tree the model containing the

datastores. 2. Double-click the datastore containing the column that must be set as mandatory. The Datastore Editor appears.

3. In the Columns tab, check the Not Null field for each column that is mandatory.

4. Select Save from the File main menu.

5.3.4.5 Filter

To add a filter to a datastore:

1. In the Designer Navigator, expand in the Model tree the model and then one of

the datastores into which you want to add the filter.

2. Select the Filter node, right-click and select New Condition.

3. Enter the Name for the filter.

4. In the Where field enter the expression that implements the filter. This expression

is a SQL WHERE expression used to filter source records.

5. In the Control tab, check Filter Active for Static Control if you want data from

this table to be filtered prior to checking it a static control.

6. Select Save from the File main menu.

5.4 Editing and Viewing a Datastores Data

To view a datastores data: 1. Select the datastore from the model in the Designer Navigator.

2. Right-click and select View Data.

The data appear in a non editable grid. To edit a datastores data: 1. Select the datastore from the model in the Designer Navigator. 2. Right-click and select Data... The data appear in an editable grid in the Data Editor. The Refresh button enables you to edit and run again the query returning the datastore data. You can filter the data and perform free queries on the datastore using this method. It is possible to edit a datastores data if the connectivity used and the data server users privileges allow it, and if the datastore structure enables to identify each row of the datastore PK, etc..

5.5 Using Partitioning

Oracle Data Integrator is able to use database-defined partitions when processing data in partitioned tables used as source or targets of integration interfaces. These partitions are created in the datastore corresponding to the table, either through the Note: The data displayed is the data stored in the physical schema corresponding to the models logical schema, in the current working context.