How Synapse Handles CDC Replay Safety
May 2026
Synapse replay safety comes from a guarded MERGE contract, not from assuming a retried batch will never repeat a key.
Short Answer
Synapse handles CDC replay safety by applying changes with MERGE and only updating a matched row when the staging _skippr_order_token is newer than the token already stored in the target. That newer-wins comparison is what makes repeated mutations safe to replay.
Deletes are protected through companion tombstone tables. If a key was deleted with a newer token, a replayed older insert for the same key should not be applied, which prevents the classic ghost-resurrection problem after retries.
Why Teams Struggle with This
This matters because repeated delivery is normal in batch-oriented warehouse systems. A retry can resend the same business key, or two batches can overlap during recovery. Without an ordering rule inside Synapse, the destination can look successful while still ending up with stale row state.
- A replay-safe MERGE needs both a business key and a freshness check.
- Deletes need their own durable record or older inserts become ambiguous.
- Final-state correctness is more important than whether the batch syntax succeeded.
- The row readers query in Synapse should not depend on guessed downstream cleanup.
How Skippr Handles It
Skippr keeps the Synapse destination contract simple and explicit: CDC-managed tables get an _skippr_order_token column, companion tombstone tables, and MERGE-based apply behavior through the Synapse path.
A concrete example: subscription_id = 55 changes from active to canceled, then an older replay of active is retried later. The MERGE comparison keeps canceled because the target already holds the newer token, which is exactly what replay safety is supposed to do.
- Synapse CDC in Skippr uses MERGE statements for final-state reconciliation.
- The order-token column is created automatically on CDC-managed tables.
- Tombstone tables preserve delete order for anti-resurrection protection.
- The destination contract stays close to the dbt bootstrap path.
What the First Useful Version Looks Like
Synapse replay safety is not exotic. It is the same core rule as other final-state destinations: do not let older state win for the same logical row.
What matters is making that rule explicit in the warehouse instead of expecting analysts to repair it later.
