Idempotent pipelines: the one habit that saves you
If re-running a pipeline can change the answer, every retry is a gamble. Idempotency makes retries free, and turns 3am recoveries into a non-event.
A pipeline is idempotent when running it twice produces the same result as running it once. It sounds academic until 3am, when a job half-failed and you need to re-run it without double-counting revenue.
The classic pattern is a merge on a unique key: instead of inserting rows, you upsert them, so a replay overwrites rather than duplicates. Pair it with a watermark — only pull records changed since the last successful run — and backfills and retries become safe, boring operations.
Idempotency is what turns a fragile script into infrastructure you can trust to heal itself.