Many data pipelines begin with a straightforward pattern: read a source table, copy every row and overwrite or reload the destination. It is easy to understand and can be perfectly reasonable for small reference datasets. As source volumes grow, however, full extraction can become expensive, slow and disruptive to operational systems.
Incremental ingestion reduces repeated work by processing only new or changed data. The difficult part is not writing a filter on an update timestamp. It is preserving the meaning of changes across retries, deletes, late updates, schema changes and failures.
1. Full load, watermark and CDC: what is the difference?
Full load
A full load reads the complete source dataset for each run. It is simple to reason about and can provide a clean rebuild path. It is useful for small dimensions, static reference data, initial snapshots and sources that do not expose reliable change metadata. Its cost grows with the entire dataset, even when only a few rows change.
Watermark-based incremental load
A watermark uses a source column—often a modification timestamp or increasing identifier—to identify rows that changed after the last successful extraction point. A control table stores the last committed watermark. This can be efficient, but only if the source column is reliable and updates are represented correctly.
SELECT *
FROM dbo.orders
WHERE modified_at > @previous_watermark
AND modified_at <= @upper_bound;
The upper bound should be captured for the run and committed only after the extracted data is safely applied to the destination. If the watermark is advanced too early, a failed run can permanently skip records.
Change data capture
CDC reads a source's change mechanism, commonly a transaction log or change table, to identify inserts, updates and deletes. Depending on the source technology, it may preserve operation type and ordering metadata that a simple timestamp does not provide. CDC is not universally available and requires lifecycle management for the source change stream.
2. Choose the pattern based on source guarantees
| Pattern | Best fit | Main risk |
|---|---|---|
| Full load | Small tables, snapshots, simple recovery | Repeated source and compute cost |
| Watermark | Reliable update timestamp or monotonic key | Missed late updates or deletes |
| CDC / change tracking | Source exposes transactional change metadata | Retention, ordering and checkpoint gaps |
| File modification time | File-based landing zones with stable file semantics | Overwrites, clock skew and incomplete file discovery |
Use the simplest method that meets the source's correctness requirements. A more sophisticated CDC implementation is not automatically better if the source cannot retain logs long enough or the target cannot apply changes idempotently.
3. Design the initial snapshot and ongoing changes together
One common mistake is to build the initial full load independently from the CDC process. Changes that occur while the snapshot is running can then be missed or applied twice. Use a source-supported snapshot boundary or a documented handoff strategy.
- Establish a consistent snapshot point or capture position where the source supports it.
- Load the initial dataset into a staging or landing area.
- Capture changes from the matching log position or checkpoint.
- Apply the captured changes in order, using a stable source key.
- Reconcile counts and key aggregates before declaring the initial sync complete.
The exact sequence depends on the database and connector. If the source cannot provide a consistent snapshot/change boundary, document the residual gap and use a controlled reconciliation or overlap strategy.
4. Make retries safe with idempotent processing
Distributed pipelines fail. A destination write may succeed while the orchestration layer times out before recording success. Retrying the same batch must not create duplicate rows or corrupt state.
Use a stable business key plus change metadata to determine which version wins. For example, a target merge may match on order_id and update only when the incoming source version is newer:
MERGE INTO silver.orders AS target
USING staging.orders_changes AS source
ON target.order_id = source.order_id
WHEN MATCHED
AND source.source_version > target.source_version
AND source.operation <> 'D'
THEN UPDATE SET *
WHEN NOT MATCHED
AND source.operation <> 'D'
THEN INSERT *
;
This is illustrative SQL, not a portable statement for every engine. Adapt syntax and schema handling to the target platform. Deletes should be represented explicitly—either as a physical delete or a tombstone—according to downstream audit and replay requirements.
5. Treat checkpoints as transactional state
A checkpoint is not just a timestamp written at the end of a notebook. It is the boundary between changes already applied and changes still to process. Store enough information to resume safely, such as source object, extraction position, upper bound, run ID, status, row counts and commit time.
Use a run lifecycle such as:
- Started: capture a fixed upper boundary and create a run record.
- Extracted: persist the change batch to durable landing or staging storage.
- Applied: merge changes into the target and record the target commit or batch ID.
- Validated: reconcile expected counts, key uniqueness and operation totals.
- Committed: advance the source checkpoint only after the target application is durable and validated.
6. Handle deletes, late arrivals and out-of-order changes
Deletes
A row removed from the source will not appear in a normal watermark query unless the source records the deletion separately. Use CDC delete events, soft-delete flags, periodic key reconciliation or another source-supported mechanism.
Late-arriving updates
A source system may update an old business record today. Filter by the update event, not the business date. If timestamps can arrive late or have low precision, use a bounded overlap window and deduplicate by a stable change identifier or version.
Out-of-order changes
When multiple updates arrive for one key, use source sequence, log position or another authoritative ordering field. Arrival time in the data lake is not necessarily the order in which source transactions occurred.
7. Plan for schema evolution and backfills
Schema changes should be detected and reviewed before they silently alter downstream contracts. Define which additive changes can be accepted automatically and which changes—renames, type narrowing, key changes or semantic changes—require explicit approval.
Backfills should be separate, observable operations with a defined date or key range. They should not overwrite the live checkpoint or race with ongoing CDC processing. Use isolated staging, controlled merge rules and a reconciliation report before promoting backfilled data.
8. Monitor correctness, not only pipeline status
- Source-to-target lag and last successfully committed position.
- Insert, update and delete counts by batch.
- Duplicate business keys and conflicting versions.
- Rejected or quarantined records with reason codes.
- Source log retention headroom and checkpoint age.
- Reconciliation differences and backfill history.
A pipeline can report success while data is stale, incomplete or incorrectly merged. Define data freshness and reconciliation objectives alongside runtime alerts.
9. A practical decision checklist
- Does the source expose CDC, change tracking or a reliable modification column?
- How are hard deletes detected?
- Can a consistent initial snapshot be coordinated with ongoing changes?
- What identifies a unique row and orders multiple updates?
- Where is the checkpoint stored, and when is it committed?
- Can a batch be replayed without duplicates?
- How are schema changes, backfills and source log expiry handled?
Conclusion
Incremental ingestion is a correctness design, not merely a performance trick. Select a capture method that matches source capabilities, keep checkpoints behind durable target commits, make merges replay-safe and continuously reconcile the result. Those practices make pipelines more efficient without sacrificing trust.
Explore TierShift's Data Engineering services for help designing reliable ingestion and lakehouse pipelines.
Sources and further reading
- Microsoft Fabric: Change data capture in Copy Job
- Azure Data Factory: Change data capture concepts
- Azure Data Factory: Incremental copy patterns
Connector support and CDC behaviour vary by source, destination and product version. Confirm current limitations and checkpoint semantics in the official documentation for the connector you deploy.