Alternative Change Sequence column using the source database server’s commit timestamp

Creation date: 14/07/2025 17:10    Updated: 14/07/2025 17:17   ar_h_db_commit_timestamp change sequence change sequence number change_seq header__change_seq

The purpose of this solution is to show you how to create an alternative change sequence column that uses the source database server's commit timestamp. By default, the change sequence timestamp is based on the Qlik Replicate server's timestamp, and if that is inaccurate, then you may see inaccurate timestamps in the default change sequence column.

Disclaimer: Do not deploy this solution without consulting with IBT first. This solution is not fit for everyone.

  1. Open Global Rules
  2. Select New Rule → Transformation
  3. Add Column → Next

4. Enter the relevant tables to apply the new column to or keep as is to apply to all tables in the task → Select Next

5. Enter the Column name → Select the FX button


6. In the Build Expression text box enter the following code. This will create a value similar to the change sequence value seen in the change table. However, the timestamp will be based off of the commit timestamp in the source database.

"SUBSTR( REPLACE( REPLACE( REPLACE( REPLACE( $AR_H_DB_COMMIT_TIMESTAMP, '-', ''), ' ', ''), ':', ''), '.', ''), 1, 16) || substr(CAST($AR_H_CHANGE_SEQ AS TEXT), -19)"

7.Select Parse Expression, then test some values, you should get a result like this
20250714062911000000000000000022661


8. Select Ok → Enter a name for your new rule → Select Finish

9. You will have to stop and save the task for the changes to take effect. If the new column is not created, stop and resume the logstream staging task (if in logstream setup). Otherwise please let us know if you encounter an issue you cannot resolve.