<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do keys defined in Replicate prevent duplicates from reaching the target? in Qlik Replicate</title>
    <link>https://community.qlik.com/t5/Qlik-Replicate/How-do-keys-defined-in-Replicate-prevent-duplicates-from/m-p/2496963#M13379</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/110970"&gt;@Heinvandenheuvel&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/115309"&gt;@john_wang&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Apologies for the late reply. I am on QR may 2023. Build 322. Yes, the following error handling settings are indeed set:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MoeyE_0-1733783188464.png" style="width: 563px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/175467i5989C49E52942736/image-dimensions/563x166?v=v2" width="563" height="166" role="button" title="MoeyE_0-1733783188464.png" alt="MoeyE_0-1733783188464.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Furthermore, batch apply mode is set for CDC.&lt;/P&gt;
&lt;P&gt;I was doing a bit of research and found this &lt;A href="https://community.qlik.com/t5/Official-Support-Articles/Qlik-Replicate-Implementing-UPSERT-and-MERGE-modes-by-applying-a/ta-p/1780009" target="_self"&gt;QR article on MERGE and UPSERT&lt;/A&gt;&amp;nbsp;which states that when batch apply mode is enabled,&lt;/P&gt;
&lt;P&gt;"&lt;SPAN&gt;Either option (Upsert/Merge) does an unconditional Delete of all rows in the batch, followed by an Insert of all rows.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;Note: The other thing to note is that with this setting the actual update that fails is inserted in a way that may not be obvious and could cause issue with downstream processing. In batch apply mode the task will actually issue a pair of transactions (1st a delete of the record and then 2nd an insert) this pair of transactions is unconditional and will result in a "newly inserted row every time the record is updated on the source&lt;/EM&gt;."&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;So my understanding is that when these settings are enabled, Replicate will now always apply changes by doing a delete then insert, even if the change is an update.&lt;/P&gt;
&lt;P&gt;However for transactional apply, "&lt;SPAN&gt;the original statement is run and if it errors out then the switch is done (try and catch). ".&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks for the help guys.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Mohammed&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Dec 2024 23:00:15 GMT</pubDate>
    <dc:creator>MoeE</dc:creator>
    <dc:date>2024-12-09T23:00:15Z</dc:date>
    <item>
      <title>How do keys defined in Replicate prevent duplicates from reaching the target?</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/How-do-keys-defined-in-Replicate-prevent-duplicates-from/m-p/2496361#M13345</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have run into some interesting behaviour while I was doing some testing. I have a task that goes from Oracle to SQL server with one table only. The source table and target tables don't have any primary key or unique indexes defined on them. However, in Replicate -&amp;gt; Table Settings -&amp;gt; Transform, I've defined a combination of three columns as keys.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MoeyE_0-1733445220992.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/175273i00646FAB9915C0E9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MoeyE_0-1733445220992.png" alt="MoeyE_0-1733445220992.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I tested inserting some duplicates on the source database however these duplicates are not applied to the target database, even though the target has no primary key or unique index defined on it. How exactly does this work? How does Replicate identify duplicates? Does it read the incoming records then compare them against the target table to decide whether or not to apply them? Is this less performant than having the actual PK/Unique Index on the target table? Please help me understand how this works, it is appreciated as always. Thanks.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Mohammed&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2024 00:34:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/How-do-keys-defined-in-Replicate-prevent-duplicates-from/m-p/2496361#M13345</guid>
      <dc:creator>MoeE</dc:creator>
      <dc:date>2024-12-06T00:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do keys defined in Replicate prevent duplicates from reaching the target?</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/How-do-keys-defined-in-Replicate-prevent-duplicates-from/m-p/2496364#M13347</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;SPAN&gt;Mohammed,&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/214271"&gt;@MoeE&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Good morning and thanks for reaching out!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;In newer major versions, Qlik Replicate does not check for duplicates when applying changes to the target. Instead, it improves performance by first deleting the corresponding rows (based on the primary key) and then inserting the updated rows.&lt;/P&gt;
&lt;P&gt;To analyze the details of this behavior, you can set the &lt;CODE&gt;TARGET_APPLY&lt;/CODE&gt; parameter to &lt;CODE&gt;Verbose&lt;/CODE&gt; and review the task log file.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;John.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2024 01:01:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/How-do-keys-defined-in-Replicate-prevent-duplicates-from/m-p/2496364#M13347</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2024-12-06T01:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do keys defined in Replicate prevent duplicates from reaching the target?</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/How-do-keys-defined-in-Replicate-prevent-duplicates-from/m-p/2496650#M13361</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/214271"&gt;@MoeE&lt;/a&gt;&amp;nbsp;- What version are you using.&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/115309"&gt;@john_wang&lt;/a&gt;&amp;nbsp; - "&lt;SPAN&gt;&lt;EM&gt;In newer major versions&lt;/EM&gt;"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please indicate the transition point.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/115309"&gt;@john_wang&lt;/a&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;- "&lt;EM&gt;Replicate...&amp;nbsp; improves performance by first deleting the corresponding rows ...&lt;/EM&gt; "&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Hmmm, is it (now?) unconditionally doing this?&lt;/P&gt;
&lt;P&gt;My understanding is that this is only used when the task setting for Error Handling - Apply Conflict -&amp;nbsp;Duplicate key when applying INSERT - is set to - UPDATE the existing target record.&lt;/P&gt;
&lt;P&gt;Hein.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;XXX - Settings&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Error Handling&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV class="modal-body ng-scope"&gt;
&lt;DIV class="includedModalTpl ng-scope"&gt;
&lt;DIV class="H100W100 TaskSettingContent ng-scope"&gt;
&lt;DIV class="panel-group" role="tablist"&gt;
&lt;DIV class="panel-default ng-scope ng-isolate-scope panel panel-open"&gt;
&lt;DIV id="accordiongroup-1152-282-panel" class="panel-collapse in collapse" role="tabpanel" aria-labelledby="accordiongroup-1152-282-tab" aria-hidden="false" aria-expanded="true"&gt;
&lt;DIV class="panel-body"&gt;
&lt;DIV id="applyConflicts_SUB_ITEM_HEADER" class="accordionGroupContentContainer ng-scope active"&gt;&lt;SPAN&gt;Apply Conflicts&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="panel-default ng-scope ng-isolate-scope panel"&gt;
&lt;DIV id="accordiongroup-1154-4937-tab" class="panel-heading" role="tab" aria-selected="false"&gt;
&lt;DIV class="acc_heading ng-scope"&gt;&lt;LABEL class="bold ng-binding"&gt;Apply Conflicts Handling Policy&lt;/LABEL&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="accordionItemContent ng-scope"&gt;&lt;FORM class="H100W100 ng-pristine ng-valid ng-scope" name="taskSettingsForm" novalidate="novalidate"&gt;
&lt;DIV id="applyConflicts_TAB" class="H100W100 ng-scope"&gt;
&lt;DIV class="ErrorHandlingContentWrapper ng-scope"&gt;
&lt;DIV class="ErrorHandlingTopPanel mainLeftRightPadding ng-scope"&gt;
&lt;DIV class="H100W100 mainContentRightPadding ng-scope"&gt;
&lt;DIV id="globalOrSpecificPolicy"&gt;
&lt;DIV id="errorHandlingPolicyTypeTxt"&gt;&lt;LABEL class="bold ng-binding"&gt;A task error handling policy is set.&lt;/LABEL&gt;&lt;/DIV&gt;
&lt;DIV id="errorHandlingPolicyTypeBtn"&gt;&lt;BUTTON id="ut__globalPolicyButton" class="ng-binding" type="button"&gt;Change to Global Policy&lt;/BUTTON&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="ErrorHandlingContent"&gt;
&lt;DIV id="applyConflictsPolicy" class="H100W100"&gt;
&lt;DIV class="errorHandlingRow"&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="errorHandlingRow"&gt;&lt;SPAN&gt;Duplicate key when applying INSERT:&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="errorHandlingRow"&gt;
&lt;DIV class="attSelectList attComboBox "&gt;
&lt;DIV class="textInputInRowWrap"&gt;&lt;SPAN class="non-edit-text ng-binding" title="UPDATE the existing target record"&gt;UPDATE the existing target record&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV class="errorHandlingRow"&gt;
&lt;DIV id="ut__escalation_count" class="errorHandlingTextInput attStepperStyle attStepperStyleInline "&gt;
&lt;DIV class="stepperButtonsWrap btn-group btn-group-vertical"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="serverSettingsGroup disabled"&gt;
&lt;DIV class="errorHandlingRow"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/FORM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sat, 07 Dec 2024 03:14:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/How-do-keys-defined-in-Replicate-prevent-duplicates-from/m-p/2496650#M13361</guid>
      <dc:creator>Heinvandenheuvel</dc:creator>
      <dc:date>2024-12-07T03:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do keys defined in Replicate prevent duplicates from reaching the target?</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/How-do-keys-defined-in-Replicate-prevent-duplicates-from/m-p/2496692#M13365</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/110970"&gt;@Heinvandenheuvel&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/214271"&gt;@MoeE&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Yes, you are right Hein. In Qlik Replicate 2024.5/2024.11, it's&amp;nbsp;&lt;SPAN&gt;unconditionally to do deleting first then inserting updated row back if the task set to UPSERT mode.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In previous versions, Replicate will detect the confliction first, if PK violates then convert the operations.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;John.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2024 07:52:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/How-do-keys-defined-in-Replicate-prevent-duplicates-from/m-p/2496692#M13365</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2024-12-08T07:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do keys defined in Replicate prevent duplicates from reaching the target?</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/How-do-keys-defined-in-Replicate-prevent-duplicates-from/m-p/2496721#M13366</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/115309"&gt;@john_wang&lt;/a&gt;&amp;nbsp;&lt;EM&gt;"it's&amp;nbsp;unconditionally to do deleting first then inserting updated row back&lt;FONT color="#FF00FF"&gt; if the task set&lt;/FONT&gt; "&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;We are miss-communicating. When I wrote unconditionally, I meant without customer control, out of the box.&lt;/P&gt;
&lt;P&gt;But it seems it still&amp;nbsp; _is_ conditional on upsert mode, which is an error handling end-user choice and OFF by default.&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;&lt;EM&gt;&amp;nbsp;In previous versions, Replicate will detect the confliction first,&amp;nbsp;&lt;SPAN&gt;if PK violates then convert the operations."&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;I beg to differ. In previous (and current!?) it would submit a batch of rows to update,&amp;nbsp; a duplicate error would be found, and all of updates would fail. Replicate would then attempt an update for each individual row in the batch for that table to determine which row cause the batch failure and then Ignore, Log, Suspent or stop, unless "&lt;SPAN class="non-edit-text ng-binding" title="UPDATE the existing target record"&gt;UPDATE the existing target record" is selected. This may take 'forever' for certain non-OLTP targets, like 2 seconds/row = 6 hours for 10,000 rows.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="non-edit-text ng-binding" title="UPDATE the existing target record"&gt;Replicate will never be convert the operation after the fact. Instead it prevents the condition by pre-deleting ALL target rows from the batch (not just the duplicates) first and then re-inserting all the rows.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="non-edit-text ng-binding" title="UPDATE the existing target record"&gt;That may or might not be more effective depending on the target DB (for sure more effective for SnowFlake) and furthermore it may or might not fit the customers data integrity whishes. As such, then may never ever become the default IMnsHO.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Hein.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2024 21:31:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/How-do-keys-defined-in-Replicate-prevent-duplicates-from/m-p/2496721#M13366</guid>
      <dc:creator>Heinvandenheuvel</dc:creator>
      <dc:date>2024-12-08T21:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do keys defined in Replicate prevent duplicates from reaching the target?</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/How-do-keys-defined-in-Replicate-prevent-duplicates-from/m-p/2496963#M13379</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/110970"&gt;@Heinvandenheuvel&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/115309"&gt;@john_wang&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Apologies for the late reply. I am on QR may 2023. Build 322. Yes, the following error handling settings are indeed set:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MoeyE_0-1733783188464.png" style="width: 563px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/175467i5989C49E52942736/image-dimensions/563x166?v=v2" width="563" height="166" role="button" title="MoeyE_0-1733783188464.png" alt="MoeyE_0-1733783188464.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Furthermore, batch apply mode is set for CDC.&lt;/P&gt;
&lt;P&gt;I was doing a bit of research and found this &lt;A href="https://community.qlik.com/t5/Official-Support-Articles/Qlik-Replicate-Implementing-UPSERT-and-MERGE-modes-by-applying-a/ta-p/1780009" target="_self"&gt;QR article on MERGE and UPSERT&lt;/A&gt;&amp;nbsp;which states that when batch apply mode is enabled,&lt;/P&gt;
&lt;P&gt;"&lt;SPAN&gt;Either option (Upsert/Merge) does an unconditional Delete of all rows in the batch, followed by an Insert of all rows.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;Note: The other thing to note is that with this setting the actual update that fails is inserted in a way that may not be obvious and could cause issue with downstream processing. In batch apply mode the task will actually issue a pair of transactions (1st a delete of the record and then 2nd an insert) this pair of transactions is unconditional and will result in a "newly inserted row every time the record is updated on the source&lt;/EM&gt;."&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;So my understanding is that when these settings are enabled, Replicate will now always apply changes by doing a delete then insert, even if the change is an update.&lt;/P&gt;
&lt;P&gt;However for transactional apply, "&lt;SPAN&gt;the original statement is run and if it errors out then the switch is done (try and catch). ".&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks for the help guys.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Mohammed&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2024 23:00:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/How-do-keys-defined-in-Replicate-prevent-duplicates-from/m-p/2496963#M13379</guid>
      <dc:creator>MoeE</dc:creator>
      <dc:date>2024-12-09T23:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do keys defined in Replicate prevent duplicates from reaching the target?</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/How-do-keys-defined-in-Replicate-prevent-duplicates-from/m-p/2496965#M13380</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/110970"&gt;@Heinvandenheuvel&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/115309"&gt;@john_wang&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I did a bit of testing on how each works, with target_apply logging increased. This was done with a unique index enabled on the target table but not the source. Batch apply mode is enabled, Upsert and Merge is enabled. Furthermore&amp;nbsp;AR_H_OPERATION was added to the table. These were the results:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Update a record that doesn’t exist in the target
&lt;UL&gt;
&lt;LI&gt;DELETE then INSERT occurs in the logs&lt;/LI&gt;
&lt;LI&gt;Shown as UPDATE in the AR_H_OPERATION column and console&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Insert a duplicate record
&lt;UL&gt;
&lt;LI&gt;DELETE then INSERT occurs in the logs&lt;/LI&gt;
&lt;LI&gt;Shown as INSERT in the console and in the AR_H_OPERATION column&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Next I tested after removing only the key from the table in QR then doing a reload. Here are the results.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Update a record that doesn't exist in the target
&lt;UL&gt;
&lt;LI&gt;Shown as an UPDATE in the QR console&lt;/LI&gt;
&lt;LI&gt;Looks like an INSERT occurs then an update&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Insert a duplicate record
&lt;UL&gt;
&lt;LI&gt;Duplicate record is inserted into table&lt;/LI&gt;
&lt;LI&gt;Logs show INSERTS only&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Finally I tested with the key only being defined in QR but not the target table or the source:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Update a record that doesn't exist in the target
&lt;UL&gt;
&lt;LI&gt;Nothing happens in the target&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Insert a duplicate record
&lt;UL&gt;
&lt;LI&gt;Duplicate created on the source but not the target&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;!-- notionvc: 70a6f5e8-b881-4be1-9252-53458cda330f --&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Mohammed&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 01:13:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/How-do-keys-defined-in-Replicate-prevent-duplicates-from/m-p/2496965#M13380</guid>
      <dc:creator>MoeE</dc:creator>
      <dc:date>2024-12-10T01:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do keys defined in Replicate prevent duplicates from reaching the target?</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/How-do-keys-defined-in-Replicate-prevent-duplicates-from/m-p/2497035#M13385</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/214271"&gt;@MoeE&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Yes, this is how Qlik Replicate works. Thanks for the detailed information.&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;&amp;nbsp;&lt;EM&gt;Upsert and Merge is enabled&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;I'm a bit confused: first, for Oracle source SQL server target task, the &lt;STRONG&gt;Merge&lt;/STRONG&gt; option is not available; secondly, it's not supported if you enable both of them. You can only enable one of them even for Cloud target endpoints.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;John.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 09:37:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/How-do-keys-defined-in-Replicate-prevent-duplicates-from/m-p/2497035#M13385</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2024-12-10T09:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do keys defined in Replicate prevent duplicates from reaching the target?</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/How-do-keys-defined-in-Replicate-prevent-duplicates-from/m-p/2497062#M13389</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/214271"&gt;@MoeE&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Please find this link: &lt;A href="https://help.qlik.com/en-US/replicate/May2024/Content/Global_Common/Content/SharedEMReplicate/Customize%20Tasks/tasks_applychangtunestab.htm#ar_tasks_custom_1624443382_1694425:~:text=The-,Apply%20changes%20using%20SQL%20MERGE,-and%20Optimize%20inserts%20options%20are%20available" target="_blank" rel="noopener"&gt;Apply Changes using SQL Merge&lt;/A&gt; for more information. As John mentioned, once you enable 'Apply changes using SQL MERGE,' if you return to the 'Apply Conflicts Handling Policy' page, all options will be grayed out.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Desmond&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 11:23:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/How-do-keys-defined-in-Replicate-prevent-duplicates-from/m-p/2497062#M13389</guid>
      <dc:creator>DesmondWOO</dc:creator>
      <dc:date>2024-12-10T11:23:47Z</dc:date>
    </item>
  </channel>
</rss>

