โ11-10-2023 04:07 AM
Solved! Go to Solution.
โ11-13-2023 07:59 AM
I had this issue with another client. Every edit to a record in System A would create or update a record in System B. Which means that if a new record in System A was created and then modified, it could create 2 new records in System B. To resolve this, we do the following:
1. Check if there is a unique Id in System A.
2. If Yes - match with that record in System B.
3. If NO -
3.1 Wait 5 minutes
3.2. Retrieve the same record details
3.3. Check if the Id is now populated (since another job might have completed in the meantime)
3.4. Yes - use that record
3.5. No - create new record.
This has eliminated 99% of our duplicates.
โ11-13-2023 07:59 AM
I had this issue with another client. Every edit to a record in System A would create or update a record in System B. Which means that if a new record in System A was created and then modified, it could create 2 new records in System B. To resolve this, we do the following:
1. Check if there is a unique Id in System A.
2. If Yes - match with that record in System B.
3. If NO -
3.1 Wait 5 minutes
3.2. Retrieve the same record details
3.3. Check if the Id is now populated (since another job might have completed in the meantime)
3.4. Yes - use that record
3.5. No - create new record.
This has eliminated 99% of our duplicates.
โ12-06-2023 12:32 AM
Thanks for the response @rachelnatik.
This looks like a good idea but in our case we are doing batches of records at a time to handle large volumes and the wait times may cause delays as much as using single thread!
The unique Id gave a new idea! We'll have the System B to enforce unique constraint on Id from System A. Thus any duplicates for same record(Id in system A) created in system B would be rejected!(We're ok with the rejections on duplicates and log them)