Tools for Mapping Extra Data to the Exceptions Table
The following are some tools that you can use in the COLMAP
clause to populate extra columns:
-
If the names and definitions of the source columns are identical to those of the target columns in the exceptions table, you can use the
USEDEFAULTS
keyword instead of explicitly mapping names. Otherwise, you must map those columns in theCOLMAP
clause, for example:COLMAP (exceptions_col1 = col1, [...])
-
To map the before image of the source row to columns in the exceptions table, use the
@BEFORE
conversion function, which captures the before image of a column from the trail record. This example shows the@BEFORE
usage.COLMAP (USEDEFAULTS, exceptions_col1 = @BEFORE (source_col1), & exceptions_col2 = @BEFORE (source_col2), [...])
-
To map the current image of the target row to columns in the exceptions table, use a
SQLEXEC
query to capture the image, and then map the results of the query to the columns in the exceptions table by using the 'queryID.column
' syntax in theCOLMAP
clause, as in the following example:COLMAP (USEDEFAULTS, name_current =
queryID
.name
, phone_current =queryID
.phone
, [...]) -
To map timestamps, database errors, and other environmental information, use the appropriate Oracle GoldenGate column-conversion functions. For example, the following maps the current timestamp at time of execution.
res_date = @DATENOW ()
See Sample Exceptions Mapping with Additional Columns in the Exceptions Table, for how to combine these features in a COLMAP
clause in the
exceptions MAP
statement to populate a detailed exceptions table.
See Reference for Oracle GoldenGate for Windows and UNIX for the usage and syntax of the parameters and column-conversion functions shown in these examples.