I have recently started to get the following error with recurring BYOD export:
""Violation of PRIMARY KEY constraint 'PK_XXXStaging'. Cannot insert duplicate key in object 'dbo.XXXStaging'. The duplicate key value is (Export across company: XXX - 17.12.2024 10.24.47.-09C1857EBD804C81884EF1BA788EC8DA, 1.0000000000000000, 150-000002, initial).". Failed to insert record into staging table. The keys of the record are DEFINITIONGROUP, EXECUTIONID, XXX, PARTITION, XXX. Duplicate records must be removed from the file prior to import."
The entity being exported is a custom and it's been working fine so far. It stopped working the following day when Quality update of 10.0.41 was installed so, I assume something was changed there (but may also be coincidence).
I have truncated the entity's staging table and republished entity to BYOD, but nothing works. It complains about duplicate event when I choose to export only one record!
I have checked that the entity works fine (with odata query) - there are no duplicates. I also exported some rows to CSV files and they work fine. Also rows gets copied to staging table just fine, but the problem is the target SQL BYOD Staging-table - the final step of the process.
Have anyone solved this kind of situation earlier?