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

Announcements
Qlik Named a 7-Time Gartner® Magic Quadrant™ Leader: See the 2026 Report
cancel
Showing results for 
Search instead for 
Did you mean: 
FabioTavares
Contributor II
Contributor II

Qlik Replicate - Duplicated record and replication via multiple tasks

I have a tasks that normally is always running and replicating data from tables. At certain time this task failed and we only detected after the maximum period for cdc retention. I then created a different task when I fully loaded some of the tables, executed it and started the first one again

In one such table I detected some records were duplicated. The table in question has no PK defined in the source so I the duplication is due to that + the fact that i used 2 different tasks (no PK I would guess, no merge ability).

What would be the correct way to avoid the situations?

Labels (2)
2 Solutions

Accepted Solutions
john_wang
Support
Support

Hello @FabioTavares ,

There are two approaches to reload tables in a task:

  1. Reload the entire task
    This will reload all tables in the task.

  2. Reload individual table(s)
    Only the selected table(s) will be reloaded, while the remaining tables will stay in CDC mode, for example:

john_wang_0-1768909396354.png

Note:
If you prefer to use two separate tasks - one for reloading tables and another for CDC - you should set the preparation option to:

“TRUNCATE before loading”

john_wang_1-1768909522965.png

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!

View solution in original post

DesmondWOO
Support
Support

Hi @FabioTavares ,

Since Qlik Replicate may revert to an earlier position, e.g. error, to ensure all changes are applied to the target, duplicate records can occur if the target does not have a primary key or unique index, or primary key/unique index constraint is not enforced.

Regards,
Desmond
Desmond

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

View solution in original post

2 Replies
john_wang
Support
Support

Hello @FabioTavares ,

There are two approaches to reload tables in a task:

  1. Reload the entire task
    This will reload all tables in the task.

  2. Reload individual table(s)
    Only the selected table(s) will be reloaded, while the remaining tables will stay in CDC mode, for example:

john_wang_0-1768909396354.png

Note:
If you prefer to use two separate tasks - one for reloading tables and another for CDC - you should set the preparation option to:

“TRUNCATE before loading”

john_wang_1-1768909522965.png

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
Support

Hi @FabioTavares ,

Since Qlik Replicate may revert to an earlier position, e.g. error, to ensure all changes are applied to the target, duplicate records can occur if the target does not have a primary key or unique index, or primary key/unique index constraint is not enforced.

Regards,
Desmond
Desmond

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