Your Airflow task runs INSERT INTO fct_orders SELECT * FROM stg_orders. It was marked failed on a downstream timeout and retried automatically. What is in the table now?
The setup — predict the table before reading on
fct_orders starts empty. stg_orders holds one delivery at a time.
The load — run once per delivery
INSERT INTO fct_orders SELECT order_id, amount FROM stg_orders;
The deliveries, in order
1run 1 — orders_2026-03-01.csv
stg_orders — delivery 1 order_id amount 1 100 2 250 3 80 2run 2 — the same file, after the task was retried
The load itself succeeded both times. Nothing errored, nothing alerted.
stg_orders — delivery 2 order_id amount 1 100 2 250 3 80
Why they ask this
It is the cheapest possible probe for whether you have ever operated a pipeline. Everyone knows the word idempotent; this asks whether you know what its absence looks like in a table on a Tuesday morning.
Say this
Every row from that file is in the table twice, and nothing anywhere reported a problem — both runs succeeded. The load is not idempotent, so the retry the orchestrator performed for you silently doubled the data.
The reasoning
A retry is not an exceptional event you can design around later. It is the normal operating mode of every orchestrator ever built: tasks are retried on timeout, on a killed worker, on a transient network error, and often by a human clicking “clear” without reading what the task does. So the real question is not “will this run twice” but “what does the table look like when it does”.
For a plain append the answer is: every row twice. Three orders became six. Note what did *not* happen — no constraint fired, no task went red, no alert triggered. The pipeline is in a perfectly healthy state by every signal it emits, and revenue is double. This is why duplicate-from-retry is usually found by a finance analyst rather than by monitoring, often weeks later.
The fix is not “be careful with retries” — you do not control who reruns what. The fix is to make the write itself produce the same table whether it runs once or five times, which means keying it: delete-then-insert on the business key, or overwrite the whole partition the file belongs to. Both are covered in the next two questions, and both turn this failure into a non-event.
The run — 2 deliveries, in order replay duplicated rows, verified
Three orders in, run twice. Both runs succeeded.
1after run 1 — orders_2026-03-01.csv
fct_orders order_id amount 1 100 2 250 3 80 2after run 2 — the same file, after the task was retried
fct_orders order_id amount 1 100 1 100 2 250 2 250 3 80 3 80
The answer most people give
“It would fail on a primary key violation.” Only if there is a primary key — and analytical tables in warehouses and lakehouses very often have none, because the engines either do not enforce them or do not have them at all. Assuming the database will catch this for you is the single most common way it gets shipped.
They’ll ask next
So make it idempotent — and then: does your fix still work when two days’ files are loaded in the same run?
