How To: Create a new column using a derived value using an /CaptureExpression for a File Location
Overview:
How to combine two columns on source, skumodel & serial_num into one combined value column on target (model_serial)
Description
Since your target is a file location you can't just simply add the column as an /Extra column with an /IntegrateExpression (because the /IntegrateExpression would use the target DBMS functions) but it can be achieved with a small workaround using instead a /CaptureLocation
Steps
Step 1] Double click on the table's name in the GUI
Step 2] Add the column manually to the table:
Step 3] Define a /ColumnProperties action on your source location or location group as below:
Location SRC /ColumnProperties /Name=model_serial /Absent /CaptureExpression="trim({skumodel})||'-'||trim({serial_num})" /Datatype=varchar2 /Length=201
Step 4] Reinitialize your jobs with "Scripts and Jobs"
Please note that adding a /CaptureExpression to your replication can create an overhead because of the expensive round-trip calls made to the database in every captured row. We have an enhancement request in place and our developers are exploring the possibility to make this happen in-flight without leveraging the DBMS functions.