The next step is to create the metadata for the target tables in the repository. The actual tables that the target definitions describe do not exist yet.
Target definitions define the structure of tables in the target database or the structure of file targets the Integration Service creates when you run a session. If you add a relational target definition to the repository that does not exist in a database, you need to create target table. You do this by generating and executing the necessary SQL code within the Target Designer.
In the following steps, you copy the EMPLOYEES source definition into the Target Designer to create the target definition. Then, you modify the target definition by deleting and adding columns to create the definition you want.
In the Designer, click
Tools
Target Designer
to open the Target Designer.
Drag the EMPLOYEES source definition from the Navigator to the Target Designer workspace.
The Designer creates a target definition, EMPLOYEES, with the same column definitions as the EMPLOYEES source definition and the same database type.
Next, modify the target column definitions.
Double-click the title bar of the EMPLOYEES target definition to open it.
Click
Rename
and name the target definition T_EMPLOYEES.
If you need to 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 EMPLOYEES source definition.
The following image shows the
Columns
tab for the target definition T_EMPLOYEES:
Add button
Delete button
Select the following columns and click the
Delete
button.
JOB_ID
ADDRESS1
ADDRESS2
CITY
STATE
POSTAL_CODE
HOME_PHONE
EMAIL
The following image shows the final target definition when you finish creating the target definition:
The EMPLOYEE_ID column is a primary key. The primary key cannot accept null values. The Designer selects Not Null and enables the Not Null option. You now have a column ready to receive data from the EMPLOYEE_ID column in the EMPLOYEES source table.