Striim 3.9.7 documentation

Modifying output using ColumnMap

When using ColumnMap (see Mapping columns), in place of the source column name you may specify a field in the METADATA or USERDATA map, an environment variable, or a static string. You may use this to overwrite data from the input stream or to supply data for columns in the target table for which the input stream has no values.

See also Changing and masking field values using MODIFY and Masking functions for other ways to modify output.

Note

Field names are case-sensitive.

For example, to write the CDC log timestamp in the METADATA map to the target column CDCTIMESTAMP:

... ColumnMap(EMP_NAME=NAME,EMP_ID=ID,EMP_DOB=DOB,CDCTIMESTAMP=@METADATA(TimeStamp))'

To specify a field in the USERDATA map (see Adding user-defined data to WAEvent streams), use @USERDATA(<field name>):

... ColumnMap(EMP_NAME=NAME,EMP_ID=ID,EMP_DOB=DOB,EMP_CITY=@USERDATA(city))'

To write the Striim server's $HOSTNAME environment variable to the target column STRIIMSERVER:

... ColumnMap(EMP_NAME=NAME,EMP_ID=ID,EMP_DOB=DOB,STRIIMSERVER=$HOSTNAME)'

To write a static string, the syntax is:

... ColumnMap(<field name>='<string>')'

You may modify multiple tables by using wildcards. For example:

SRC_SCHEMA.%,TGT_SCHEMA.% COLUMNMAP(CDCTIMESTAMP=@METADATA(TimeStamp))