Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Sometimes we need to store column's before-image data in the target table. This is useful if we want to store both of the before-image and after-image of the columns values in the target table for downstream apps usage.
Under Apply Changes mode (Store changes mode is turn off), in the table setting by adding a new column in transformation (name it as "prevenient_salary" in this sample), the variable expression is like $BI__<columnName> where $BI__ is a mandatory prefix (which instructs Replicate to capture the before-image data) and <columnName> is the original table column. For example if the original table column name is SALARY then $BI__SALARY is the column before-image data:
If the column SALARY value is updated from 22 to 33 in source side, then before the UPDATE the target table row looks like:
after the UPDATE is applied to target table the row looks like:
In this sample the before-image value is 22, the after-image value is 33.
before-image data can be used in filer also, see sample here .
Hi, Will this work on CT table in the store changes mode also?
Hello @Solomon ,
Thanks for the update.
Yes, it works however by design both Before Image & After Image of change row are recorded in the __ct table already, unless it's turned off. A sample of task setting:
Regards,
John.