Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
UPGRADE ADVISORY for Qlik Replicate 2024.5: Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Leandro_Medeiros
Contributor II
Contributor II

How to Never Capture DELETE´s in QLIK Replicate

Hi everyone,

I would like to create a QLIK Task to capture only INSERT and UPDATE from a table.

To Never process DELETE.

Is it possible  ?

 

Thanks in advance.

 

Rgds., Leandro Medeiros

 

Labels (2)
1 Solution

Accepted Solutions
john_wang
Support
Support

Hello Leandro Medeiros @Leandro_Medeiros ,

I'm not entirely sure which source database you're using, but in most relational databases, all operations, including INSERT, UPDATE, and DELETE are recorded in the transaction logs. Typically, there's no straightforward way to prevent DELETE operations from being logged.

However, in Qlik Replicate, there are a few options available to ignore DELETE operations, even though they are still present in the transaction logs:

  1. Using a Filter
       You can add a global filter rule like:
       $AR_H_OPERATION != 'DELETE'
       This will cause all DELETE operations to be ignored.
       ⚠️ Note: This may lead to warnings or errors if the same primary key row is deleted and then re-inserted. Since the DELETE is ignored, the INSERT could result in a duplicate primary key violation on the target.

  2. Using Filter + UPSERT mode
       Similar to approach (1) however the UPSERTmode will solve the duplicate PK violation issue. Check this article for more detailed info:
    https://community.qlik.com/t5/Official-Support-Articles/Qlik-Replicate-Implementing-UPSERT-and-MERGE...

  3. Using Soft Delete
       With this approach, Qlik Replicate still processes DELETE operations from the source and replicates them to the target. However, instead of removing the row from the target, it marks the row with a "deleted" flag, this is known as a soft-delete
       You can find more details in the related documentation/articles on soft-delete:

https://community.qlik.com/t5/Official-Support-Articles/Qlik-Replicate-Global-Transformation-Soft-De...

https://community.qlik.com/t5/Official-Support-Articles/How-to-implement-quot-soft-quot-deletes-on-r...

https://community.qlik.com/t5/Official-Support-Articles/How-to-create-a-Qlik-Replicate-task-to-captu...

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

3 Replies
john_wang
Support
Support

Hello Leandro Medeiros @Leandro_Medeiros ,

I'm not entirely sure which source database you're using, but in most relational databases, all operations, including INSERT, UPDATE, and DELETE are recorded in the transaction logs. Typically, there's no straightforward way to prevent DELETE operations from being logged.

However, in Qlik Replicate, there are a few options available to ignore DELETE operations, even though they are still present in the transaction logs:

  1. Using a Filter
       You can add a global filter rule like:
       $AR_H_OPERATION != 'DELETE'
       This will cause all DELETE operations to be ignored.
       ⚠️ Note: This may lead to warnings or errors if the same primary key row is deleted and then re-inserted. Since the DELETE is ignored, the INSERT could result in a duplicate primary key violation on the target.

  2. Using Filter + UPSERT mode
       Similar to approach (1) however the UPSERTmode will solve the duplicate PK violation issue. Check this article for more detailed info:
    https://community.qlik.com/t5/Official-Support-Articles/Qlik-Replicate-Implementing-UPSERT-and-MERGE...

  3. Using Soft Delete
       With this approach, Qlik Replicate still processes DELETE operations from the source and replicates them to the target. However, instead of removing the row from the target, it marks the row with a "deleted" flag, this is known as a soft-delete
       You can find more details in the related documentation/articles on soft-delete:

https://community.qlik.com/t5/Official-Support-Articles/Qlik-Replicate-Global-Transformation-Soft-De...

https://community.qlik.com/t5/Official-Support-Articles/How-to-implement-quot-soft-quot-deletes-on-r...

https://community.qlik.com/t5/Official-Support-Articles/How-to-create-a-Qlik-Replicate-task-to-captu...

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!
Leandro_Medeiros
Contributor II
Contributor II
Author

Hi John,

"$AR_H_OPERATION != 'DELETE' "  is Perfect !!!

Thank you so much.

 

john_wang
Support
Support

Thank you so much for your outstanding support! @Leandro_Medeiros 

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