Incremental loads are meant to make data movement faster by copying only what changed since the last run. That sounds simple, but in practice the phrase “what changed” can be trickier than it first appears.
Many solutions rely on a watermark, such as a timestamp or increasing ID, to decide where the next load should begin. That can work well, but only if the source system behaves in a predictable way and the loader records its progress carefully.
If those assumptions are wrong, a watermark can quietly miss rows, reload the same data, or create gaps that are hard to detect.
In this article, we’ll look at what a watermark can miss, why incremental loads sometimes fail in subtle ways, and how to design a more reliable loading process.
Define what advances the watermark
An increasing identifier can work for append-only inserts, but it does not detect updates to existing rows. A last-modified timestamp can capture updates only if every relevant change reliably updates that timestamp.
Ask who sets the value, which clock is used, what precision it has, and whether it reflects transaction commit order. A timestamp assigned before a long transaction commits can create a late-visible row behind an already advanced watermark.
That is why “select everything newer than the last successful time” is an assumption to validate, not a universal correctness guarantee.
Fix the interval for each run
A conceptual load can use an old checkpoint and a fixed upper boundary, processing values in the interval greater than the old boundary and less than or equal to the upper boundary.
Record the boundaries as part of the run. Advance the durable checkpoint only after the destination changes for that interval are safely committed.
If the destination succeeds but checkpoint persistence fails, the same interval may be processed again. Design the destination operation to tolerate that replay using stable business keys and appropriate uniqueness or upsert rules.
Treat ordering and visibility separately
A timestamp plus a unique identifier can provide deterministic ordering among rows with equal timestamps. It helps with pagination within a stable extraction scope.
It does not automatically solve a transaction that commits late with an older timestamp. Nor does it reveal a hard-deleted source row. Those problems need separate mechanisms.
Depending on the source, options include a validated change feed, change tracking, change data capture, a controlled overlap window with deduplication, or periodic reconciliation. Check each mechanism’s retention and recovery behavior.
Give deletions an explicit representation
If a source row disappears, a timestamp query over the remaining rows cannot return it. Decide whether the source supplies a deletion event, uses a soft-delete flag, or requires comparison against an authoritative snapshot.
Also distinguish a genuine deletion from a temporary access restriction or incomplete source extract. Removing destination records based on a partial source result can create a much larger problem than a delayed update.
Make the run explainable
Record the run identifier, boundaries, source count, destination outcomes, rejected records and checkpoint result. Use enough information to answer whether a failed run can be repeated safely.
| Test case | Required decision |
|---|---|
| Two updates share a timestamp | Both changes are included under the extraction rules. |
| A transaction becomes visible late | A recovery mechanism captures the missed change. |
| The destination commits before a crash | Replaying the interval does not duplicate effects. |
| A source row is deleted | The destination receives an explicit deletion outcome. |
Reconcile beyond individual runs
Even a successful sequence of loads should be checked periodically against the source using meaningful counts, keys and selected business totals. A green scheduler status only confirms that the workflow reached its own completion condition.
A reliable incremental pipeline is a contract about change visibility, replay and reconciliation. The watermark is one part of that contract, not proof that every change has been captured.
Technical references
Continue learning
For a structured introduction to data management, quality and governance, explore my course Data Management for Beginners – Main Principles on Udemy. Review the curriculum and preview to see whether it fits your next learning goal.
Read Also
- Differences Between Batch and Streaming Data
- What is Data Management and why it is Important?
- Mastering Python & SQL Server: Best Practices
Stay connected
Subscribe to the GnoelixiAI Hub newsletter on LinkedIn for practical insights on AI, data and technology.
Watch more on YouTube: SQLNetHub TV and my personal channel.
Originally published on SQLNetHub.
© SQLNetHub
Artemakis Artemiou is a seasoned Senior Database and AI/Automation Architect with over 20 years of expertise in the IT industry. As a Certified Database, Cloud, and AI professional, he has been recognized as a thought leader, earning the prestigious Microsoft Data Platform MVP title for nine consecutive years (2009-2018). Driven by a passion for simplifying complex topics, Artemakis shares his expertise through articles, online courses, and speaking engagements. He empowers professionals around the globe to excel in Databases, Cloud, AI, Automation, and Software Development. Committed to innovation and education, Artemakis strives to make technology accessible and impactful for everyone.