Skip to main content
Announcements
UPGRADE ADVISORY for Qlik Replicate 2024.5: Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
MoeE
Partner - Creator III

How do these Error Handling settings function without primary keys?

Hi,

If there is no primary key on the target database how does this function? I know that according to this article: Click here, it does a delete of all the records in the batch then just does an insert. However if there are no primary keys to identify the record, does it simply scan the table till it finds it? Assume the task is initially in batch apply processing mode.

 

This is for a task that has only tables without primary keys and searching for ways to stop it from entering one-by-one mode whenever changes appear. Any pointers with this scenario would be helpful. Thank you.

MoeyE_0-1710887341985.png

 

Regards,

Mohammed

 

Labels (2)
5 Replies
john_wang
Support

Hello Mohammed, @MoeE 

Thanks for opening the article. Good question!


Assume the task is initially in batch apply processing mode.

Batch Optimized Apply mode requires the table has Unique Index or Primary Key, otherwise it will be switch to Transactional Apply mode.

Regarding the error handling policy and one-by-one mode doubts, If you can share the source/target databases type, we may confirm it for you again, much better if you can open a support ticket.

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!
DesmondWOO
Support

Hi @MoeE ,

As John mentioned earlier, please provide source/target database types since the handling method may vary. I observe that "Apply Conflicts Handling Policy" setting may affect also. 

In my environment, when I set "Insert the missing target record", INSERT records are inserted into the attrep_change table. However, if the setting is "Log record to the exceptions table", no changes are inserted into the same table.

For further investigation, please submit a support ticket and provide a diagnostic package.

Regards,
Desmond

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

Hi @john_wang and @DesmondWOO ,

Source is Oracle and target is SQL Server. Just wondering about the behavior in this particular scenario. Thanks.

Regards,

Mohammed

DesmondWOO
Support

Hi @MoeE ,

Please find my test result based on your particular scenario.

INSERT: Changes are applied from the attrep_change table.
UPDATE/DELETE: It is one-by-one.

You can verify the result by enabling verbose logging on TARGET_APPLY.

Regards,
Desmond

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

Hello @MoeE 

primary keys are serves not only as a means to uniquely identify each record but also supports the performance, integrity, defining primary keys is essential for efficient and reliable way for DML Operation as This is crucial for accurately identifying records.

The more QR accurately and efficiently identify the records it will process UPDATE/DELETE faster, in that PK plays a very big role.

Regards,

Sushil Kumar