Skip to the page

Data pipelines in production · mid

When a pipeline breaks or the numbers are wrong

In an incident, tell users early, contain the damage, find the cause layer by layer, repair the data safely and add a check so it cannot repeat. Tell the story with numbers and your own part.

The notes

What you must know

  • Order of work: detect, contain, communicate, diagnose, repair the data, fix the cause, prevent.
  • Tell users early with a status, an ETA and a fallback (provisional or previous-day numbers), not at the last minute. Mark a suspect dashboard as under investigation and stop automatic exports.
  • Diagnose layer by layer: counts in the source database, bronze, silver and gold. A job can be green and still produce wrong data.
  • Doubled revenue: check evenness across cities (duplication) or one place (join bug or real change), duplicates on the key, run history and recent changes. Typical cause: INSERT INTO appends, the first attempt committed and the retry inserted again.
  • Fix the load to be idempotent (partition overwrite or MERGE on the key), keep no unrelated steps after the commit in the same task, add a uniqueness test that blocks publishing, and an anomaly check on daily revenue against the same weekday.
  • Failed nightly run: read the log, find what the 9 am report needs, update the cause (for example a rotated password in the connection), clear only the failed task and downstream tasks, and run the models the report needs first. Validate row counts and totals before sending.
  • Proper fix: credentials read from a secrets manager at run time, failures paged to on-call, a deadline alert, a runbook and a blameless review.
  • City shows zero orders with all jobs green: silver has orders and gold does not because an INNER JOIN to dim_city dropped orders with a new city id. Use a LEFT JOIN with an unknown member, load dimensions at least as often as facts, test relationships and add a volume check per city.
  • A strong incident story has numbers (rows, rupees, hours), a clear I, a real cause (non-idempotent load, schema change, late data, skew, silent default), a data repair and a concrete prevention. It owns mistakes without blaming others.

The red pen

Common traps: mistake → fix

  • Mistake: Rerun the whole pipeline blindly

    Fix: find the cause and clear only what failed.

  • Mistake: Delete rows by hand without finding the cause

    Fix: the next retry repeats it.

  • Mistake: All DAGs are green so the data is right

    Fix: check counts per layer and per city.

Easy to hard

Questions interviewers ask, easy to hard

  1. The nightly pipeline failed and finance needs numbers at 9 am. What do you do at 6:30?
  2. Yesterday's revenue doubled in the warehouse. What do you do?
  3. Every DAG is green but a city shows zero orders. Why?
  4. Tell me about a data incident you handled.

Explain it out loud

Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.

Practise by voice

Your first interview is free

Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.

Start your free interview