Datastores Introduction to Models

5-4 Oracle Fusion Middleware Developers Guide for Oracle Data Integrator ■ Enter in the Mask field the mask of tables to reverse engineer. The mask selects the objects to reverse. This mask uses the SQL LIKE syntax. The percent symbol means zero or more characters, and the underscore _ symbol means one character. ■ Optionally, you can specify the characters to remove for the table alias. These are the characters to delete in order to derive the alias. Note that if the datastores already exist, the characters specified here will not be removed from the table alias. Updating a datastore is not applied to the table alias.

2. In the Selective Reverse tab select Selective Reverse, New Datastores, Existing

Datastores and Objects to Reverse. 3. A list of datastores to be reverse-engineered appears. Leave those you wish to reverse-engineer checked.

4. Select Save from the File main menu.

5. Click Reverse Engineer in the Model toolbar menu.

6. Oracle Data Integrator launches a reverse-engineering process for the selected datastores. A progress bar indicates the progress of the reverse-engineering process. The reverse-engineered datastores appear under the model node in the Models panel. Customized Reverse-Engineering A Customized Reverse-Engineering uses a Reverse-engineering Knowledge Module RKM, to retrieve metadata for a specific type of technology and create the corresponding datastore definition in the data model. For example, for the Oracle technology, the RKM Oracle accesses the database dictionary tables to retrieve the definition of tables, columns, keys, etc, that are created in the model. To perform a Customized Reverse-Engineering using a RKM:

1. In the Reverse tab of your Model:

■ Select Customized. ■ Select the Context used for the reverse-engineering ■ Select the Types of objects to reverse-engineer. Only object of these types will be taken into account by the reverse-engineering process. ■ Enter in the Mask the mask of tables to reverse engineer. ■ Select the KM that you want to use for performing the reverse-engineering process. This KM is typically called RKM technology.name of the project. ■ Optionally, you can specify the characters to remove for the table alias. These are the characters to delete in order to derive the alias. Note that if the datastores already exist, the characters specified here will not be removed from the table alias. Updating a datastore is not applied to the table alias. Note: Using a RKM requires that you import this RKM into a project. Refer to Chapter 9, Creating an Integration Project for more information on KM import. Creating and Reverse-Engineering a Model 5-5

2. Click Reverse Engineer in the Model toolbar menu, then Yes to validate the

changes.

3. Click OK.

4. The Session Started Window appears.

5. Click OK.

You can review the reverse-engineering tasks in the Operator Navigator. If the reverse-engineering process completes correctly, reverse-engineered datastores appear under the model node in the Models panel.

5.3 Creating and Reverse-Engineering a Datastore

Although the recommended method for creating datastores in a model is reverse-engineering, it is possible to manually define datastores in a blank model. It is the recommended path for creating flat file datastores.

5.3.1 Creating a Datastore

To create a datastore:

1. From the Models tree in Designer Navigator, select a Model or a Sub-Model.

2. Right-click and select New Datastore.

3. In the Definition tab, fill in the following fields:

■ Name of the Datastore : This is the name that appears in the trees and that is used to reference the datastore from a project ■ Resource Name : Name of the object in the form recognized by the data server which stores it. This may be a table name, a file name, the name of a JMS Queue, etc. ■ Alias : This is a default alias used to prefix this datastore’s columns names in expressions.

4. If the datastore represents a flat file delimited or fixed, in the File tab, fill in the

following fields: ■ File Format : Select the type of your flat file, fixed or delimited. ■ Header : Number of header lines for the flat file. ■ Record Separator and Field Separator define the characters used to separate records lines in the file, and fields within one record. Record Separator : One or several characters separating lines or records in the file: – MS-DOS: DOS carriage return – Unix: UNIX carriage return – Other: Free text you can input as characters or hexadecimal codes Field Separator : One ore several characters separating the fields in a record. – Tabulation – Space – Other: Free text you can input as characters or hexadecimal code