data-pipeline-idempotency

Designs data pipelines that produce identical output state across any number of re-runs.

1|Updated Jul 3, 2026
One-click install
npx skills add https://github.com/Nandansai08/skillz --skill data-pipeline-idempotency-nandansai08
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: data-pipeline-idempotency
Source: https://github.com/Nandansai08/skillz/tree/main/skills/data-analytics/data-pipeline-idempotency
Command: npx skills add https://github.com/Nandansai08/skillz --skill data-pipeline-idempotency-nandansai08

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Re-runs from retries, backfills, and operator mistakes silently duplicate or skip data when pipelines use blind appends, wall-clock windows, or non-atomic watermarks. This Skill turns any scheduled pipeline into one where the same logical input always produces the same output state. ## Core Features & Use Cases - Safe Write Patterns: Choose between overwrite-by-partition (INSERT OVERWRITE, Delta replaceWhere) and keyed merge/upsert with deterministic tie-breaks, replacing unsafe blind appends. - Watermark & Backfill Design: Track high-water marks transactionally with the load, apply late-arrival lag, and run backfills through the same code path as daily jobs with reconciliation checks. - Side-Effect Safety: Make emails, webhooks, and counters idempotent via idempotency keys or sent-logs, and prove correctness with a double-run test in CI. - Use Case: An Airflow retry storm re-ran six hours of revenue tasks and double-counted 3.2% of revenue. Rebuild the job to read all source rows for the logical date, write via INSERT OVERWRITE PARTITION, and add a duplicate-rate tripwire. ## Quick Start Review my scheduled pipeline and make it safe to re-run and backfill without duplicating data.

Frequently Asked Questions about data-pipeline-idempotency

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make a data pipeline idempotent?▼

Use one of two safe write patterns: overwrite-by-partition, where the job replaces an entire partition such as a date wholesale, or merge/upsert on a natural key with a deterministic tie-break. Then verify with a double-run test that running the job twice yields identical output.

How do I design a watermark for incremental data loads?▼

Store the high-water mark in a state table updated in the same transaction as the load itself, so crashes cannot skip or duplicate batches. Subtract a late-arrival lag, such as one hour, and rely on merge semantics so overlapping reprocessing is harmless.

Why is using now() or CURRENT_DATE in scheduled jobs a problem?▼

Wall-clock time makes results depend on when the job runs, so re-runs and backfills produce different output than the original run. Always derive the processing date from the scheduler's logical or execution date instead.

How should I run a backfill without double-counting data?▼

Run the exact same code path as the daily job, parameterized by date range, with bounded parallelism to avoid overloading the warehouse. Finish with a reconciliation query comparing counts and totals per day against the source as the exit criterion.

What happens to emails and webhooks when a pipeline re-runs?▼

Side effects like emails, webhooks, and counters fire again on every re-run unless made idempotent. Use idempotency keys on external calls, a sent-log checked before sending, or move side effects downstream of the data write.

When is idempotency not needed for a data job?▼

Genuinely one-off exploratory transforms do not require idempotency guarantees. However, the moment such a job gets a schedule or trigger, retries and re-runs become inevitable and the idempotency workflow applies.