The load stage is where idempotency matters most
Extract and transform can be retried freely — the inputs are read-only and the outputs are in-memory. Load writes to a destination that other people read from, which means a buggy load can corrupt downstream reports, dashboards, and ML training data. Get this stage wrong and the consequences leave your machine.
The four canonical write patterns
- Replace — overwrite the entire target. Safest semantics; only viable for small datasets.
- Append — add new rows. Simplest, but rerunning doubles rows. Forbidden in pipelines unless you have other dedup logic downstream.
- Partition replace — replace a single partition (e.g.
date=2026-04-30) atomically. The default for time-partitioned warehouses. - Upsert — merge by primary key. Insert if new, update if exists. Cleanest semantics, requires destination support (Postgres
ON CONFLICT, MERGE in warehouses).