Forum Discussion

SrikanthSolanki's avatar
SrikanthSolanki
Copper Contributor
Oct 29, 2026

Azure Data Factory: How do you handle late-arriving records in incremental loads?

I am looking at approaches for implementing incremental loads in Azure Data Factory when records can arrive late or existing records can be updated after the initial load.

A watermark based on a source timestamp works for many scenarios, but a strict timestamp > last_watermark filter can miss records if multiple rows share the same timestamp or if updates arrive outside the expected window.

For a reliable pipeline, would you recommend:

  • Using an overlapping extraction window and deduplicating records in the target?
  • Tracking a source-specific change version or change tracking mechanism?
  • Using a combination of a watermark and periodic reconciliation?

The source is a relational database, and the target needs to remain consistent without reloading the entire dataset every time.

What approach would you recommend, and what edge cases should be considered when implementing this in Azure Data Factory?

2 Replies

  • benibix's avatar
    benibix
    Brass Contributor

    Hi SrikanthSolanki

    Jamony's reply covers the main choice. One thing to add if you go the native route: in a mapping data flow, the CDC checkpoint is tied to the pipeline name and the activity name. Rename either and the checkpoint resets, so the next run starts from the beginning or from "now". Set your own Checkpoint key in the data flow activity to avoid that. Debug runs reset it too when you refresh the browser, so judge the first published run, not the debug one.

    Microsoft lists SQL Server, Azure SQL Database and Azure SQL Managed Instance as sources for native CDC in data flows. It picks up deletes and needs no timestamp column. For other relational sources, the auto incremental option needs an incremental column but still manages the checkpoint for you. Details are here: https://learn.microsoft.com/en-us/azure/data-factory/concepts-change-data-capture

    Which database is your source?

  • For your relational source, I would prefer source-native change tracking when available, with reconciliation as a safety net. For SQL Server or Azure SQL, Microsoft documents ADF pipelines using old/new change versions to capture inserts, updates, and deletes. This avoids relying solely on application timestamps, but change retention must exceed the longest pipeline outage.

     

    If the source cannot expose changes, use a bounded overlapping extraction window and idempotent target upserts keyed by the source primary key. Capture a fixed upper boundary for each run, process the complete interval, and advance the saved watermark only after the target write succeeds. Replays must safely produce the same target state.

     

    Test timestamp ties, precision/time-zone conversion, null watermarks, concurrent updates, retries, and deletes. Overlap alone cannot recover arbitrarily late changes outside its window or detect physical deletions; schedule reconciliation and choose its scope from your source’s actual lateness guarantees.