Part of the Pravadh suite — IQ · SI · PM · GX · MW

Incremental sync with a cursor field

By default, a flow reads whatever its source query returns -- which, left unqualified, can mean re-reading every record on every run. Incremental sync fixes that: it remembers the highest value seen for a field (a LastModifiedDate, an auto-incrementing ID) and only asks the source for records newer than that on the next run.

Setting it up

Set Cursor field on the flow to the source field that only moves forward over time -- most commonly a "last modified" timestamp. On each successful run, Pravadh MW:

  1. Builds an incremental query using the connector's own high-water-mark logic (build_incremental_query) and the cursor value from the previous run
  2. Reads only what's newer
  3. Advances the stored cursor to the newest value it saw, ready for next time

The very first run has no prior cursor, so it reads everything -- exactly what you'd want for an initial backfill.

Mixed types across runs

If a connector ever returns a native type on one run and a string on another (a common side effect of round-tripping through storage), the comparison falls back to string comparison rather than crashing the run. ISO-8601 timestamps -- the usual choice for a cursor field -- still sort correctly this way.

What's next