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.
Environment
- Qlik Replicate All supported versions
Detailed Steps:
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:
![john_wang_0-1631886000257.png john_wang_0-1631886000257.png](https://community.qlik.com/t5/image/serverpage/image-id/62190iE036CBB6515F929B/image-size/medium?v=v2&px=400)
If the column SALARY value is updated from 22 to 33 in source side, then before the UPDATE the target table row looks like:
![john_wang_1-1631886148470.png john_wang_1-1631886148470.png](https://community.qlik.com/t5/image/serverpage/image-id/62194iEFB0F4394194C5BF/image-size/medium?v=v2&px=400)
after the UPDATE is applied to target table the row looks like:
![john_wang_2-1631886156364.png john_wang_2-1631886156364.png](https://community.qlik.com/t5/image/serverpage/image-id/62195i43DBFC21005CC0C2/image-size/medium?v=v2&px=400)
In this sample the before-image value is 22, the after-image value is 33.
Related Content
before-image data can be used in filer also, see sample here .
Qlik Replicate