DE//AGENT
Explore
Pattern community intermediate

Incremental Batch with a Watermark

Full reloads are too slow and too expensive once a table grows past millions of rows.

Reference architecture canvas Sources feed processing stages; a data contract sits between processing and destinations; a failure path routes invalid output to a dead-letter zone. OLTP DBs cdc Event log stream Processing transform · model idempotent writes versioned code Data contract schema · grain · SLA validated at boundary Warehouse analytics Feature/API agents · apps Dead letter quarantined output

At a glance

What Full reloads are too slow and too expensive once a table grows past millions of rows.
When Append-mostly sources; Cost-sensitive pipelines; Deterministic event/updated timestamps
Where Batch Processing

Problem

Full reloads are too slow and too expensive once a table grows past millions of rows.

Solution

Process a window that ends at a watermark and starts a lookback before it. scan from (max(watermark) - lookback) to now The lookback absorbs late arrivals; the watermark bounds the work. Write idempotently (partition overwrite or MERGE) so a re-run is safe. Handle deletes explicitly (soft-delete or periodic full refresh) — they don't arrive in an append-only stream.

When not to use

  • Little history
  • Frequently mutating data without a reliable change marker (use CDC)

Security scan

Last sweep 2026-10-24: 0 finding(s), 0 marked as examples.

Context

A batch pipeline reading an append-mostly source that has an updated_at/event time.

Forces

  • Cost grows with history size
  • Late-arriving rows must not be lost
  • Re-runs must be safe
  • Deletes may never be seen

Tradeoffs

Choose this when Costs & caveats
cost scales with new data, not history lookback trades correctness for cost; too short loses late rows
  • watch: a naive is_incremental() without a lookback silently drops late data

Diagram

[max(updated_at) - N days] ─────▶ [now]
          lookback              watermark

Registry stats

Verification community · Sep 26, 2026
Completeness 75
Trust multiplier ×1.25
Composite 37.25 · adequate
Freshness 28 days since last source check
Difficulty intermediate
Version 1.2.0
License CC-BY-4.0
Security flags none