Data Engineer Interview Question

What does it mean for a pipeline to be idempotent, and how do you build one?

What the interviewer is probing, how to structure your answer, and a spoken example you can adapt.

Quick answer

An idempotent pipeline produces the same result whether you run it once or five times for the same input window. Build it by making each run own a deterministic slice of data, then replacing that slice rather than appending to it. Use partition overwrite or a merge on a stable key, derive the window from the scheduled interval rather than the wall clock, and avoid side effects that cannot be repeated.

Why interviewers ask this

Idempotency is the property that makes retries, backfills, and incident recovery safe, so this question is really asking whether you have operated pipelines at 3am. Interviewers want the delete and insert or merge pattern, the use of the scheduled data interval rather than now(), and awareness of non repeatable side effects such as emails or external API writes.

How to structure your answer

  • Define it as run once or many times, same end state.
  • Give the mechanism: overwrite a partition or merge on a key.
  • Insist the time window comes from the schedule, not the clock.
  • Call out side effects that break idempotency.
  • Explain why this makes backfills trivial.

Example answer

Spoken example, first person

It means I can rerun yesterday's job right now and end up with exactly the same table as if it had run once cleanly. The pattern I use is that every run owns a partition, and the write is a replace of that partition rather than an append. So the job for 2026-08-25 deletes and rewrites that date's partition, or merges on a unique key, and running it four times changes nothing after the first. The detail that catches people is time. If your job filters on now minus one day, then a rerun three days later processes the wrong window, so the interval has to come from the orchestrator's data interval, not from the clock inside the task. I also watch for side effects, because we had a pipeline that sent a summary email at the end and a retry meant finance got the same report twice. We moved the notification into a separate task with its own dedupe key. Once everything is idempotent, backfilling is just running a range of dates.

Walking into this interview soon? GhostPilot listens to your live call, spots the question the moment it is asked, and puts a structured answer on your screen in real time. Try it on your next mock, or grab a $29 Session Pass, no subscription, for the real thing.

See how it works

Follow-up questions to expect

  • How would you make a pipeline that writes to an external API idempotent?
  • What is the difference between idempotent and deterministic here?
  • How do you handle a source that mutates history retroactively?

Related data engineer questions

Your interviewer will ask their own version of this. Paste your actual job description into the free Question Predictor and get the 20 questions that role is most likely to ask, with what each one is really probing.

Predict my questions

Rehearse the hard questions before they are asked

Practise with a live copilot, then walk in ready. A $29 Session Pass gets you through the interview with no subscription and no lock-in.

Get GhostPilot