Data Transformation Engine Database Interface Designer Reference Guide

Chapter 6 - Updating Database Tables Example Using Update Key Columns
Database Interface Designer Reference Guide
105
Example Using Update Key Columns
When you specify a column as a key column, the value in that column is used to
determine whether a row produced by a mapping operation should be inserted as
a new row into the table or should be used to update existing row(s) in a table.
If the values in the rows generated by the mapping operation match the values
in the key columns as defined in the Database Interface Designer, the specified
update columns are updated.
If the values in the rows generated by the mapping operation do not match the
values in the key columns, the rows are inserted as new rows into the table or
view as defined in the Database Interface Designer.
Note You can override the behavior defined in the Database Interface Designer by using
the command line to specify the appropriate database adapter commands for the
database adapter. For information about the database-specific adapter commands,
refer to the Resource Adapters Reference Guide.
In the following example, a table named Parts appears as follows:
Use the Set Table Update Key Columns dialog box in the Database Interface
Designer to select the first column (Part_Number) and move it to the Key
columns list. Select the Name and Price columns and move them to the
Columns to update list.