Propagate Primary or Foreign Key Value Function

The Propagate Function assigns a value to a primary key or foreign key column and propagates that value to all related tables.

The syntax is:

PROP( { value [, columnname| ] EXIT exitname |
PROC { LOCAL | identifier.name } } )

value
Value to assign to the column. Specify any valid column map source value (for example, a column name, string literal, expression, or function). The value must be appropriate for the column.
columnname
Name of the source column that contains the value that is the subject of the function. The resulting value is inserted into the destination column of the mapped table and the appropriate destination column in the participating related tables.

The column name is required only if no source column matches the destination column in both name and data type. If not specified, the name of the destination column is used.

exitname
A column map exit name.
identifier.name
A column map procedure name.

Before executing an insert, load, or convert process, you can review the column map to verify how the Propagate Function is used in the process.

Example 1

You can generate a random number, assign it to the default destination column, and propagate the number in the destination columns of related tables. To generate a value between 10000 and 99999, insert it into the mapped destination column and propagate it to the destination columns of related tables, specify:

PROP(RAND(10000, 99999))

Example 2

You can perform the same function as in Example 1 when the source and destination column names do not match. To include the name of the source column (CUST_NUMBER) in the Propagate Function, specify:

PROP(RAND(10000, 99999), CUST_NUMBER)

Example 3

You can use Oracle Sequence to generate the value for the destination column and propagate that value in destination columns of the related tables. To propagate the Oracle Sequence named, schema.numeven, specify:

PROP(schema.numeven.NEXTVAL)



Feedback