In an Insert Process, you use a Column Map to map columns
of compatible data between source and destination tables as well as
to manipulate data inserted in the destination table.
In this scenario, you will specify a Column Map that
inserts a special value into a column and defines an aging parameter
for another column.
To
display the Column Map Editor, right-click in
the grid cell of the Table Map Editor where you
typed LOCAL and click Open Column Map in the
shortcut menu.

The Column Map Editor includes
the following entries:
- Source
There are two entries under the heading Source:
Extract
File, which is automatically populated with the name of
the Extract File specified in the Insert Request.
Table
Name, which is automatically populated with the three-part
source table name: dbalias.creatorid.tablename.
- Destination
- Automatically populated with the three-part destination
table name: dbalias.creatorid.tablename.
- Description
- Enter a description for the Column Map.
- Source Column
- The names of
the columns in the source table are listed and can be altered as required.
For this scenario, do the following:
- Replace ORDER_SALESMAN in the Source column
list by typing the literal ‘PROMO' in
single quotes. This literal value will replace the original value
for the column.
- Replace ORDER_SHIP_DATE in the Source column
list with the following Age Function that will age the shipping date
by six weeks and change the date from a two-digit year to a four-digit
year format: AGE(SF=‘YY/MM/DD',DF=‘YYYYMMDD',+6W)
|
where: |
|
|
AGE |
Invokes the Age Function. |
|
SF=‘YY/MM/DD' |
The format of the
source data. |
|
DF=‘YYYYMMDD' |
The format of the
destination data, limited by the data type to eight characters. |
|
+6W |
The amount by which
to age the date. |
- Status
- The status of each
destination column is displayed. In this scenario, the following statuses
apply:
- The ORDER_ID, CUST_ID, ORDER_DATE, FREIGHT_CHARGES,
and ORDER_POSTED_DATE columns are defined as Equal, since the data
types of the source and destination columns are identical.
- The ORDER_SALESMAN column is defined as String Literal.
- The ORDER_SHIP_DATE column is defined as Age Function.
Note: The data types in the source and destination columns must
be compatible. If not, Status indicates the
discrepancy. For complete information, see the Common Elements Manual.
Click from the Column
Map Editor to return to the Table Map Editor.
Then click from the Table Map
Editor to return to the Insert Request Editor.