Data Transformation Engine Database Interface Designer Reference Guide

Chapter 6 - Updating Database Tables Example Using Update Key Columns
Database Interface Designer Reference Guide
106
A map is then created to update the Parts table. When the map runs, the
following two rows are produced:
PART_NUMBER Name Price
2 5” bolt 0.84
4 Flange 1.21
The value for the PART_NUMBER column in the first row produced (which is 2) is
compared to the value of the key column (PART_NUMBER) in the database, such
that any rows in the database with a PART_NUMBER equal to 2 will be updated
with the data produced by the map for that row. For example, because there is
already a row in the database that has a PART_NUMBER equal to 2, the Name
column in that row is updated to
5 bolt and the Price column is updated to
0.84.
The value for the PART_NUMBER column in the second row produced (which
is
4) is compared to the value of the key column (PART_NUMBER) in the
database, such that any rows in the database with a PART_NUMBER equal to
4
will be updated with the data produced by the map for that row. In this example,
there are no existing rows with a PART_NUMBER equal to
4. The row produced
by the map is inserted as a new row into the table.