Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Bishnu123
Contributor II
Contributor II

How to implement soft delete handling in Qlik Replicate from DB2 to Redshift?

Hi Qlik Community,

I'm working on a Qlik Replicate task where the source is  DB2 LUW  and the target is Amazon Redshift, using Full Load + CDC.

I want to implement soft delete logic — so that when a row is deleted in DB2, it is not removed from Redshift, but instead updated with a "soft delete flag".


 Use Case:

Source (DB2):

id name           phone
1 abc 23456789
2 dce 1234567890
3 efd 1234567890

Action in DB2:

  • Row with id = 3 is deleted.

Desired result in Redshift:

id name        phone is_deleted        deleted_at
1 abc 23456789 false NULL
2 dce 1234567890 false NULL
3 efd 1234567890 true 2025-06-25 15:00:00

🔧 My Current Settings:

  • Full Load: Drop and Create Table

  • CDC:

    Any tips, validation, or best practices would be much appreciated.

    Thanks in advance!

     

Labels (2)
1 Solution

Accepted Solutions
john_wang
Support
Support

Hello @Bishnu123 ,

Function operation_indicator can be used to support soft-delete.

When the operation_indicator function is invoked on its own or as part of an expression, records deleted from the source table will not be deleted from the corresponding target table. Instead, the corresponding target record will be flagged (with a user-provided value) to indicate that it was deleted from the source. For example if I add a new column "soft_delete" and its expression is like:

operation_indicator('DELETE', 'UPDATE', 'INSERT')

john_wang_0-1750905359661.png

if the record is deleted from source side, the flag "soft_delete" column's value is "DELETE".

Hope this helps.

John.

 

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!

View solution in original post

1 Reply
john_wang
Support
Support

Hello @Bishnu123 ,

Function operation_indicator can be used to support soft-delete.

When the operation_indicator function is invoked on its own or as part of an expression, records deleted from the source table will not be deleted from the corresponding target table. Instead, the corresponding target record will be flagged (with a user-provided value) to indicate that it was deleted from the source. For example if I add a new column "soft_delete" and its expression is like:

operation_indicator('DELETE', 'UPDATE', 'INSERT')

john_wang_0-1750905359661.png

if the record is deleted from source side, the flag "soft_delete" column's value is "DELETE".

Hope this helps.

John.

 

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!