Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Copy Job: upsert not working as expected

We use copy jobs to copy data from our fabric lakehouse into a sql on prem. These copy jobs are set to upsert the data. We noticed that when deleting a table on the sql on prem, then run the copy job...
  • nilendraFabric's avatar
    1 year ago

    Hello Anonymous 

     

    You are hitting a situation where the Copy Job’s upsert mechanism seems to be tied to metadata or state information that isn’t getting reset when the on-prem SQL table is dropped and recreated. Even though the pipeline recreates the table, it appears to detect no “new” rows to insert. A few approaches can help:
    1. Recreate or delete it to reset the Copy Job state
    3. Delete and rebuild the Copy Job (or create a brand-new Copy Job) so that any watermarks or incremental checkpoints are cleared and it does a fresh load.
    2. Force a full load at least once
    If the Copy Job was configured for incremental loading, temporarily switch it to a full load so it can repopulate the on-prem table. Then revert to incremental upsert after that run.

     

     

    hope this helps