Interview's MateData Engineer
Interview's Mate

Data Engineer

SQL · Spark · Lakehouse · Streaming

Visualizer

DSA Visualizer
All 32 lessons
Custom Playground
Try your own examples

Learning

System Design
31 architecture topics
SQL Learning
160 foundations → production topics
AI Engineering
160 LLM → backend topics
Data Science
160 Python → MLOps topics
Data Engineer
160 SQL → streaming topics
Docker
160 Docker learning topics
Kubernetes
160 K8s fundamentals → cloud
Java LearnSoon
Coming soon
Python Learn
Interview Q&A & internals
JavaScript Learn
Closures, async & DOM Q&A
Tech Learn
Search, practise & track Q&A
AI DSA Practice
Solve coding problems
Theme
Home
Data Engineer topics
Lesson 111/ 160
06. Data Transformation (dbt) & Workflow Orchestration

Workflow Orchestration Concepts (DAGs, Dependencies, Backfills, Idempotency)

Design DAGs with clear dependencies, safe backfills, and idempotent task semantics.

BeginnerDAGs · Backfills · Idempotency3 quiz questions
Practice Generative AI Q&A
In plain wordsDiagramTheoryStep by stepWhen to use itInterview cluesMistakes to avoidQuiz (3)Practice

In plain words

Task contracts and directed dependencies. Next, logical interval and event trigger. Finally, replay exact partitions to atomic outputs.

Think of it like…

Orchestration is a railway timetable with track switches and recovery instructions; a dependency graph without idempotent routes can send two trains into the same station.

Where you’ve seen it

A dt parameter selects 2026-11-21, the task writes dt=... to a staging version then atomically swaps the partition, and a failed retry reads the same source checkpoint rather than today().

Words you’ll hear

DAGs
A directed acyclic graph whose nodes are tasks and edges constrain valid execution order.
Backfills
A replay over historical logical intervals to populate corrected or missing data under current declared behavior.
Idempotency
A task property where rerunning the same logical input converges to the same externally visible result.
Operational boundary
A DAG with dependencies but no partition identity reprocesses the wrong day, unlimited retries repeat non-idempotent side effects, and a manual rerun that ignores upstream status publishes inconsistent output. Use logical dates/partitions as explicit task inputs, separate extraction/transformation/publication, bound retries by retryable error, and design task commits/markers so the same interval converges to the same logical dataset.

Visual diagram

Loading interactive diagram

Theory & deep dive

DAGs: the working mechanism

Orchestration turns tasks and dependency edges into scheduled runs, controls retries and concurrency, records state, and enables a partition-aware backfill where each invocation is idempotent.

Task contracts and directed dependencies. Logical interval and event trigger, then bounded concurrency and classified failures; this exposes the state governed by Idempotency.

Workflow Orchestration Concepts in one concrete design

A dt parameter selects 2026-11-21, the task writes dt=... to a staging version then atomically swaps the partition, and a failed retry reads the same source checkpoint rather than today().

Key takeaway: Orchestration turns tasks and dependency edges into scheduled runs, controls retries and concurrency, records state, and enables a partition-aware backfill where each invocation is idempotent

Workflow Orchestration Concepts: failure mode and production response

A DAG with dependencies but no partition identity reprocesses the wrong day, unlimited retries repeat non-idempotent side effects, and a manual rerun that ignores upstream status publishes inconsistent output.

Use logical dates/partitions as explicit task inputs, separate extraction/transformation/publication, bound retries by retryable error, and design task commits/markers so the same interval converges to the same logical dataset. Track Retry count as "bounded and classified by failure type", and make Backfill rate visible to the dataset owner.

Key takeaway: Use logical dates/partitions as explicit task inputs, separate extraction/transformation/publication, bound retries by retryable error, and design task commits/markers so the same interval converges to the same logical dataset.

How it works, step by step

Step 1 of 4
DAGs

1. Model graph

Task contracts and directed dependencies. Orchestration turns tasks and dependency edges into scheduled runs, controls retries and concurrency, records state, and enables a partition-aware backfill where each invocation is idempotent.

task contracts and directed dependencies
Key numbers at this step
Retry count
bounded and classified by failure type
Backfills
A replay over historical logical intervals to populate corrected or missing data under current declared behavior.

When to use it & trade-offs

What it is

Orchestration turns tasks and dependency edges into scheduled runs, controls retries and concurrency, records state, and enables a partition-aware backfill where each invocation is idempotent. A dt parameter selects 2026-11-21, the task writes dt=... to a staging version then atomically swaps the partition, and a failed retry reads the same source checkpoint rather than today().

Why it matters: A DAG with dependencies but no partition identity reprocesses the wrong day, unlimited retries repeat non-idempotent side effects, and a manual rerun that ignores upstream status publishes inconsistent output. Use logical dates/partitions as explicit task inputs, separate extraction/transformation/publication, bound retries by retryable error, and design task commits/markers so the same interval converges to the same logical dataset.

When to reach for it

  • Design DAGs with clear dependencies, safe backfills, and idempotent task semantics.
  • Choose DAGs because it provides this capability: A directed acyclic graph whose nodes are tasks and edges constrain valid execution order.
  • Keep evidence for Retry count at "bounded and classified by failure type" so the last production stage-Backfill/repair - replay exact partitions to atomic outputs-remains testable.

When to avoid or be careful

  • A DAG with dependencies but no partition identity reprocesses the wrong day, unlimited retries repeat non-idempotent side effects, and a manual rerun that ignores upstream status publishes inconsistent output.
  • Do not conflate Backfills with DAGs. The second concept contributes different behavior: A replay over historical logical intervals to populate corrected or missing data under current declared behavior.
  • Release only after this guardrail is in place: Use logical dates/partitions as explicit task inputs, separate extraction/transformation/publication, bound retries by retryable error, and design task commits/markers so the same interval converges to the same logical dataset.

DAGs / Backfills / Idempotency - roles, limits, and operating cost

DAGs
Best for: A directed acyclic graph whose nodes are tasks and edges constrain valid execution order.

Strengths: A directed acyclic graph whose nodes are tasks and edges constrain valid execution order. Orchestration turns tasks and dependency edges into scheduled runs, controls retries and concurrency, records state, and enables a partition-aware backfill where each invocation is idempotent.

Watch out: A DAG with dependencies but no partition identity reprocesses the wrong day, unlimited retries repeat non-idempotent side effects, and a manual rerun that ignores upstream status publishes inconsistent output.

Backfills
Best for: A replay over historical logical intervals to populate corrected or missing data under current declared behavior.

Strengths: A replay over historical logical intervals to populate corrected or missing data under current declared behavior. In this workflow it supports: Execute/retry - bounded concurrency and classified failures.

Watch out: The operating cost is real: historical partitions/day without starving live SLA.

Idempotency
Best for: A task property where rerunning the same logical input converges to the same externally visible result.

Strengths: A task property where rerunning the same logical input converges to the same externally visible result. Its output can be checked with Logical date.

Watch out: Operating guardrail: Use logical dates/partitions as explicit task inputs, separate extraction/transformation/publication, bound retries by retryable error, and design task commits/markers so the same interval converges to the same logical dataset.

Interview signals & numbers to know

When this topic comes up

  • “Where is the failure boundary for DAGs, and how would Retry count reveal it?”
  • “Why is Backfills distinct from this behavior: a task property where rerunning the same logical input converges to the same externally visible result?”
  • Production clue: A DAG with dependencies but no partition identity reprocesses the wrong day, unlimited retries repeat non-idempotent side effects, and a manual rerun that ignores upstream status publishes inconsistent output.
  • Design probe: Use logical dates/partitions as explicit task inputs, separate extraction/transformation/publication, bound retries by retryable error, and design task commits/markers so the same interval converges to the same logical dataset.

Benchmarks & rules of thumb

Retry count -
bounded and classified by failure type
Backfill rate -
historical partitions/day without starving live SLA
Logical date -
same parameter is visible in task, output, and metrics

Common mistakes & follow-ups

Common interview mistakes

  • A DAG with dependencies but no partition identity reprocesses the wrong day, unlimited retries repeat non-idempotent side effects, and a manual rerun that ignores upstream status publishes inconsistent output.
  • Reporting success from a job exit code without checking Retry count and Backfill rate.
  • Treating this example as complete without replay, rollback, or access boundaries: A dt parameter selects 2026-11-21, the task writes dt=... to a staging version then atomically swaps the partition, and a failed retry reads the same source checkpoint rather than today().

Likely interviewer follow-ups

  • How would you prove this contract instead of only checking that the command ran: A directed acyclic graph whose nodes are tasks and edges constrain valid execution order.
  • What does the recovery plan do when this occurs? A DAG with dependencies but no partition identity reprocesses the wrong day, unlimited retries repeat non-idempotent side effects, and a manual rerun that ignores upstream status publishes inconsistent output.
  • When is DAGs insufficient for Backfill rate, and what does adding Backfills cost in Retry count?
Interview tip: Lead with the data path and failure boundary: Orchestration turns tasks and dependency edges into scheduled runs, controls retries and concurrency, records state, and enables a partition-aware backfill where each invocation is idempotent. Then make the answer operational: Use logical dates/partitions as explicit task inputs, separate extraction/transformation/publication, bound retries by retryable error, and design task commits/markers so the same interval converges to the same logical dataset.

Knowledge check

Loading quiz

Put it into practice

Practice related interview Q&A

Apply Workflow Orchestration Concepts (DAGs, Dependencies, Backfills, Idempotency) with data engineer interview Q&A and hands-on practice.

Open Data Engineer Q&A →Machine Learning Q&A
Previous topic
dbt Documentation, Lineage Graphs (DAG) & Exposures
Next topic
Apache Airflow Architecture (Webserver, Scheduler, Workers, Metadata DB, Executors)