To create the target definition in this lesson, you copy the MANUFACTURERS source definition into the Target Designer. Then, you modify the target definition by adding columns to create the definition you want.
You can also manually create a target definition, import the definition for an existing target from a database, or create a relational target from a transformation in the Designer.
Open the Designer, connect to the repository, and open the tutorial folder.
Click
Tools
Target Designer
.
Drag the MANUFACTURERS source definition from the Navigator to the Target Designer workspace.
The Designer creates a target definition, MANUFACTURERS, with the same column definitions as the MANUFACTURERS source definition and the same database type.
Next, you add target column definitions.
Double-click the MANUFACTURERS target definition to open it.
The
Edit Tables
dialog box appears.
Click
Rename
and name the target definition T_ITEM_SUMMARY.
Optionally, change the database type for the target definition. You can select the correct database type when you edit the target definition.
Click the
Columns
tab.
The target column definitions are the same as the MANUFACTURERS source definition.
For the MANUFACTURER_NAME column, change precision to 72 and clear the Not Null column.
Add the following columns with the Money datatype, default precision, and default scale:
MAX_PRICE
MIN_PRICE
AVG_PRICE
AVG_PROFIT
If the Money datatype does not exist in the database, use Number (p,s) or Decimal and change the precision to 15 and the scale to 2.
Click
Apply
.
The following image shows the
Columns
tab for the target definition:
Click the
Indexes
tab to add an index to the target table.
If the target database is Oracle, skip to the final step. You cannot add an index to a column that already has the PRIMARY KEY constraint added to it.
The following image shows the
Indexes
tab for the target definition:
In the Indexes section, click the
Insert
button.
Enter IDX_MANUFACTURER_ID as the name of the index, and then press Enter.
Select the
Unique
index option.
In the Columns section, click
Add
.
The
Add Column To Index
dialog box lists the columns you added to the target definition.
Select MANUFACTURER_ID and click
OK
.
Click
OK
to save the changes to the target definition, and then click