Changed Data Capture Introduction to Models

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 5-6 Oracle Fusion Middleware Developers Guide for Oracle Data Integrator

5. Select Save from the File main menu.

The datastore is created. If this is a File datastore, refer to the Reverse-Engineering File Datastores section for creating columns for this datastore. It is also possible to manually edit columns for all datastores. See Adding and Deleting Datastore Columns for more information.

5.3.2 Reverse-Engineering File Datastores

Oracle Data Integrator provides specific methods for reverse-engineering flat files. The methods for reversing flat files are described below.

5.3.2.1 Reverse-Engineering Fixed Files

Fixed files can be reversed engineered using a wizard into which the boundaries of the fixed columns and their parameters can be defined.

1. Go to the Columns tab the file datastore that has a fixed format.

2. Click the Reverse button. A window opens displaying the first records of your file.

3. Click on the ruler above the file contents to create markers delimiting the columns. Right-click in the ruler to delete a marker. 4. Columns are created with pre-generated names C1, C2, and so on. You can edit the column name by clicking in the column header line below the ruler. 5. In the properties panel on the right, you can edit the parameters of the selected column.

6. You must set at least the Column Name, Datatype and Length for each column.

Note that column names of File datastores cannot contain spaces.

7. Click OK when the columns definition is complete to close the wizard.

8. Select Save from the File main menu.

5.3.2.2 Reverse-Engineering Delimited Files

Delimited files can be reversed engineered using a a built-in JDBC which analyzes the file to detect the columns and reads the column names from the file header.

1. Go to the Columns tab the file datastore that has a delimited format.

2. Click the Reverse button.

3. Oracle Data Integrator creates the list of columns according to your file content. The column type and length are set to default values. Column names are pre-generated names C1, C2, and so on or names taken from the first Header line declared for this file.

4. Review and if needed modify the Column Name, Datatype and Length for each

column. Note that column names of File datastores cannot contain spaces.

5. Select Save from the File main menu.

5.3.2.3 Reverse-Engineering COBOL Files

Fixed COBOL files structures are frequently described in Copybook files. Oracle Data Integrator can reverse-engineer the Copybook file structure into a datastore structure.

1. Go to the Columns tab the file datastore that has a delimited format.

2. Click the Reverse COBOL Copybook button.