Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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:
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.
UPSERTmode will solve the duplicate PK violation issue. Check this article for more detailed info: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:
Hope this helps.
John.
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:
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.
UPSERTmode will solve the duplicate PK violation issue. Check this article for more detailed info: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:
Hope this helps.
John.
Hi John,
"$AR_H_OPERATION != 'DELETE' " is Perfect !!!
Thank you so much.
Thank you so much for your outstanding support! @Leandro_Medeiros