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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
zacker20
Contributor III
Contributor III

Qlik Replicate on Snowflake handling UPDATES

We've noticed that when Qlik Replicate gets an update for a record on Snowflake it DELETES and then INSERTS the new record in the target table. 

Is this expected behavior?  Is there a way to get it to just run an UPDATE statement on the affected record? 

We are running in USPERT mode for Apply Conflicts

 

 




Labels (2)
7 Replies
john_wang
Support
Support

Hello @zacker20 ,

You are correct — this is expected behavior. In UPSERT mode, Qlik Replicate parses an UPDATE operation as a pair of DELETE and INSERT operations.

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!
zacker20
Contributor III
Contributor III
Author

So if I turned off UPSERT mode, it would apply UPDATES normally? 

john_wang
Support
Support

Hi @zacker20 ,

Yes, exactly.

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!
zacker20
Contributor III
Contributor III
Author

Thank you John, so turning off upsert mode - does that involve setting the Apply changes using SQL merge?    Or changing Apply Conflicts to do what exactly? 

john_wang
Support
Support

Hello @zacker20 ,

There are two main apply strategies:

1. Qlik Replicate generates the apply SQL statements

  • Regular mode: Qlik Replicate generates standard INSERT, UPDATE & DELETE SQL statements, corresponding directly to the operations in the source database.

  • UPSERT mode: Similar to regular mode for INSERT and DELETE. However, source UPDATE operations are translated into a pair of operations: DELETE followed by INSERT.

2. Snowflake MERGE functionality

If “Apply changes using SQL MERGE” is enabled in the task settings, Qlik Replicate will not generate separate INSERT, UPDATE or DELETE statements. Instead, it will use Snowflake’s MERGE functionality, where a single MERGE statement handles all three types of source operations.

Note:
When “Apply changes using SQL MERGE” is enabled, the Apply Conflicts error-handling policy is automatically preset and cannot be modified. In addition, some related configuration options will not be available.

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!
zacker20
Contributor III
Contributor III
Author

Again, thank you John.  How do I make sure Qlik Replicate is in Regular mode?  

Do I just make sure apply conflicts has:
No record found when applying DELETE: Ignore record
Duplicate key when applying INSERT: Log record to the exceptions table 
No record found for applying an UPDATE: Log record to the exceptions table

john_wang
Support
Support

Hello @zacker20 ,

You are right. And make sure the  “Apply changes using SQL MERGE” is not used.

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!