Contact us
Insights

Watermarks for mutable source data

When source records change after they’re created, a ‘created since’ watermark misses updates. How to choose one that catches every change.

The problem

Created date doesn’t catch edits

An incremental load uses a watermark to decide which records are new since the last run. Loading by created date works for data that’s only ever added to. But orders change status, quantities are amended, and refunds are applied after the event. Those edits never reach the warehouse, so reports show orders as open long after they shipped.

Options

Watermark options and their limits

Created date

Fine for data that’s never edited, such as a log of events. Misses every change to existing records.

Last modified time

Catches edits, but only if every screen, import, and API in the source updates it.

Row version number

An increasing number the database sets on every change. Reliable, where the source offers one.

Change data capture

The database records every insert, update, and delete. The most complete, with more to set up.

Making it reliable

How to make a watermark reliable

Step 1 of 4

  1. Edit a record through each screen, import, and API, and check the watermark column changes every time.

  2. Re-read the last few minutes of the previous window and merge by key, to catch slow transactions.

  3. Store the new watermark only once the data is safely committed.

  4. Decide how records removed from the source will be detected.

Deletes are invisible to most watermarks

A deleted record has no modified time to find, so it stays in the warehouse forever. If the source can delete records, use a deleted flag instead where possible, or compare the full list of keys on a schedule. For example: a weekly check of every order number in the source against the warehouse finds deleted and missed records alike.

Reports not reflecting changes in the source?

Tell us which system the data comes from and how it’s loaded. A few lines are enough.

Tell us what’s not working