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

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
AnujGupta
Contributor III
Contributor III

How to capture Insert , update ,delete in Qlik replicate

Hi, 

I am looking to store insert , update & delete in a column called DELETED_FLAG = 

CASE
WHEN operation_indicator("Y", "N", "N") = "Y" THEN 'Update'
WHEN operation_indicator("N", "Y", "N") = "Y" THEN 'Insert'
ELSE 'Delete'
END

In change processing, I have only Apply Changes Processing is ON. when I gave below expression, I am only seeing delete. 

AnujGupta_0-1697180634668.png

 

 

Labels (3)
6 Replies
john_wang
Support
Support

Hello @AnujGupta ,

If I read correctly, you want to store the operation in a dedicated flag column, let's call it "OPER". Then you may do it simply by add a new column with expression: operation_indicator('Delete','Update','Insert'), the sample:

john_wang_0-1697181538281.png

The result in SQL Server:

 

john_wang_2-1697181586757.png

Please ignore the NULL rows as they are Full Load rows (which I did not disable the Full Load).

Hope this helps.

Regards,

John.

 

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

Hi John, 

I have tried the same below but only insert I can able to see. 

AnujGupta_0-1697182264769.png

 where as delete and update also happening in source side.

AnujGupta_1-1697182318354.png

 

 

john_wang
Support
Support

Hi @AnujGupta ,

The previous samples based on MySQL Source and SQL Server target. do you mind to share the source/target endpoint types and what's the SQL you used to do insert/update/delete in source table? I'd like to confirm for you.

Regards,

John.

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

Source as a Oracle, destination as data bricks meta store table.

john_wang
Support
Support

Hello @AnujGupta ,

I got challenge while I was provisioning Databricks environment today, I will work with IT team on that next week, Seems it's hard to confirm the behavior for you today. please work with Qlik support team (support case #00118262)  on this issue and Support team would like to help you further.

Best Regards,

John.

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

Hi @AnujGupta ,

Looks to me the expression works fine in Databricks target task (Oracle is source):

operation_indicator('Delete','Update','Insert'), the task is FL + Store Changes. The result contains the 3 types of operations:

john_wang_0-1698161943879.png

If you are still facing the issue, please upload the task Diagnostics Packages to support case.

Thanks,

John.

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