Column mapping


The following panel is displayed when you enter the S (Select) line command for a pair of Db2 tables on the Source to Target Mapping.

 File-AID/RDX -----------------  Column Mapping  -------------------------------
 Command ===>                                                   SCROLL ===> CSR
                                                                SSID: DSN
 Source Table:                          Target Table:
  TSOID01.CUSTOMER_TABLE                 TSOID02.CUSTOMER_TABLE

 Line Commands:
   Use Column Number to map columns      S - Specify/display column values
   Blank - For column default value  

 Column
 Number  Source Columns     Type(Length)    CMD Target Columns     Type(Length)
 ------- ------------------ ------------    --- ------------------ ------------
 1       CUSTOMER_NAME      CHAR(6)         ___ CUSTOMER_NAME      CHAR(6)
 2       LOCATION_ID        CHAR(2)         __2 LOCATION_ID        CHAR(2)
 3       COMPANY_NAME       CHAR(30)        __3 COMPANY_NAME       CHAR(30)
 4       CARE_OF            CHAR(30)        ___ CARE_OF            CHAR(30)
 5       ADDRESS            CHAR(30)        ___ ADDRESS            CHAR(30)
 6       CITY               CHAR(25)        ___ CITY               CHAR(25)
 7       STATE              CHAR(2)         ___ STATE              CHAR(2)
 8       ZIP_CODE           CHAR(9)         ___ ZIP_CODE           CHAR(9)

Use this screen to map columns between Db2 tables in the following situations:

  • Source and target tables have columns that have different names, lengths, or data types.;
  • Columns were added to the target table or removed from the source table.;
  • Source and target tables match, but source columns need to be mapped to different target columns.
  • You want to load Db2 default values for certain fields to protect sensitive data.
  • You want to load default literal values for certain fields to protect sensitive data.

For more detailed information about column to column mapping, see Column/Field Mapping Rules.

The body of this screen consists of an upper portion and a lower portion:

Upper Portion

The upper portion of this screen consists of the following fields:

Source Table

Displays the table name from which data was extracted. When loading from a remote location, the table name is in three parts (location.creator.table). Source columns are listed in the Source Columns field.

Target Table

Displays the name of the table to be loaded. When loading to a remote location, the table name is in three parts (location.creator.table). Target columns are listed in the Target Columns field.

Lower Portion

The lower portion of this screen consists of the following columns:

Column Number

Displays a list of File-AID/RDX-generated column numbers that correspond to the columns in the source table. Enter these numbers in the CMD column to map source columns to target columns.

Important

A column without a column number indicates that it is not eligible for column mapping, for example columns with Large Object Type (CLOB, BLOB, DBCLOB) and/or ROWID.

Source Columns

Displays a list of the columns contained in the source table.

Type(Length)

Displays the data type and length for each source column (see Data Type Values).

CMD

Enter a column number in the CMD column next to a target column name to map a source column to that target column. If source and target columns’ names, data types, and lengths match, File-AID/RDX fills in this field automatically.

Blank out this field or leave this field blank if you want default values assigned to the target column when the row is inserted or loaded.

Enter the number (Lnn) of an existing literal definition to assign it directly to a target column, or enter the line command to access the Default Value Definition screen (SQL Load Option only, see Default Value Definition). Most likely, you will use literal definitions when the extracted table does not contain any values for a particular column or you want to mask certain column fields to protect sensitive data.

For more information about rules that govern column mapping, see Column/Field Mapping Rules.

Target Columns

Displays a list of columns contained in the target table.

Type(Length)

Displays the data type and length for each target column.

Important

  • If a Db2 column is a distinct type (UDT) File-AID/RDX displays either its name or its built-in column type. Use the UDTSWAP command to switch the displayed type.
  • Columns with Large Object Type (CLOB, BLOB, DBCLOB) and/or ROWID column types are not eligible for mapping.
  • BINARY columns must have the same length.

Primary Commands

CANCEL (CAN)

Terminates the Column Mapping screen and returns you to the Object Load Specification screen without mapping columns. There are no operands associated with this command.

END

Terminates the Column Mapping screen and returns you to the Object Load Specification screen with column mappings intact. There are no operands associated with this command.

UDTSWAP (UDTS)

Swaps the display for distinct type columns from UDT name to the built-in data type and length and vice versa.

Line Commands

The following line command is valid on this screen:

column-number

Indicates which source column will be mapped to a particular target column. Enter a File-AIDFile-AID/RDX-generated column number (from the Column Number column) in the CMD column next to the target column to which you want to map a source column.

S (Select)

SQL Load Option only. Indicates that you want to set every row to be loaded of the selected column to a literal value. When you press Enter, File-AID/RDX displays the Default Value Definition screen so you can specify the desired value (see Default Value Definition). The literal can be up to 50 bytes long.

Lnn (Literal Definition Number)

SQL Load Option only. Enter a previously defined literal definition number when you know that it contains the desired literal value for the selected column. In that case, File-AID/RDX skips Default Value Definition screen. To view or change the literal value, use the S line command instead. (see Default Value Definition).

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*