Fifteen common Airflow interview questions
- What is Airflow, and what is it not designed for?
- What is a DAG? Tasks versus operators?
- What are sensors, and what is deferrable mode?
- What are hooks and connections?
- Explain schedules, logical dates and data intervals.
- What does catchup do, and what is a backfill?
- Why must tasks be idempotent?
- How do tasks share data? What are XComs and their limits?
- What are the main executors, and how do they differ?
- How do retries, timeouts and SLAs work?
- What should and shouldn't go in DAG top-level code?
- What is the TaskFlow API?
- How do you handle dependencies between DAGs?
- How do you test DAGs?
- A daily DAG failed for three days. How do you recover?
Core concepts
- Airflow orchestrates — it schedules and coordinates work. It shouldn't do heavy data processing itself; tasks should trigger work in warehouses, Spark or other systems.
- DAG: a directed acyclic graph of tasks and dependencies; operators are templates for tasks (run SQL, call an API, run a container).
- Sensors wait for a condition such as a file arriving; deferrable operators release worker slots while waiting, saving resources.
- Hooks and connections encapsulate access to external systems, with credentials stored in connections or a secrets backend.
Scheduling semantics
Each DAG run covers a data interval. A daily DAG's run for an interval starting on the 1st actually executes after that interval ends, on the 2nd — a frequent source of confusion. Tasks should use the interval boundaries from the context, not the current time, so reruns process exactly the right data. Catchup creates runs for missed intervals since the start date; backfills rerun historical intervals deliberately. Both only work safely if tasks are idempotent: running a task twice for the same interval must produce the same result, typically by overwriting a partition rather than appending.
Passing data and executors
| Topic | Answer |
|---|---|
| XComs | Small metadata between tasks, such as a file path or row count — not datasets |
| Large data | Write to storage or a table; pass the location |
| LocalExecutor | Parallel tasks on one machine |
| CeleryExecutor | Distributed workers via a message broker |
| KubernetesExecutor | A pod per task — isolation and elastic scaling |
Good DAG practice
- Keep top-level code light: the scheduler parses DAG files frequently, so avoid API calls or database queries outside tasks.
- Make tasks atomic and idempotent; one logical unit of work each.
- Set retries with delay, execution timeouts and failure alerts.
- Use templating and the data interval rather than datetime.now().
- Define cross-DAG dependencies with dataset-driven scheduling or sensors rather than timing assumptions.
- Test that DAGs import without errors and that task logic works in unit tests.
Recovering failed runs
For three days of failures: fix the root cause first, then clear the failed task instances (and downstream tasks) for those intervals so Airflow reruns them in order. Because tasks are idempotent and use the data interval, each rerun processes exactly its day. Check downstream consumers and communicate the delay. See dbt interview questions for the transformation layer Airflow often triggers.
Spot the problems in a DAG
Interviewers often show a flawed DAG. Common problems: a database query at the top level of the file, which runs on every scheduler parse; datetime.now() instead of the data interval, which breaks backfills; tasks that append rather than overwrite, which duplicate data on retries; a giant task doing everything, which makes failures hard to recover; and no retries or timeouts. Naming these quickly shows production experience.
Practising
Answer these out loud, in two minutes or less each, and expect a follow-up on every claim. A free AI interview assistant such as CoPilot Interview can run Airflow questions as a mock interview built from your résumé and score each answer. Write a small DAG with a sensor, a templated SQL task and a downstream check, and explain the data interval aloud. See also data engineer interview questions.
Disclosure: CoPilot Interview is our product, so weigh what we say about it accordingly. Everything else on this page applies whichever tool you use, or none.
Frequently asked questions
What are common Airflow interview questions?
DAGs, operators, sensors and hooks, scheduling and data intervals, catchup and backfills, idempotency, XComs, executors, retries and alerting, top-level code, TaskFlow, cross-DAG dependencies, testing and recovering failed runs.
Why should Airflow tasks be idempotent?
Because tasks are retried, rerun and backfilled. Idempotent tasks produce the same result when run more than once for the same interval, avoiding duplicates or corrupted data.
What are XComs used for?
Passing small pieces of metadata between tasks, such as file paths or counts. Large datasets should be written to storage, with only their location passed.
Why does a daily DAG run a day late?
A run covers a data interval and executes after that interval ends, so the run for the 1st executes on the 2nd, when the day's data is complete.
Practise on real interview questions
Run 145 real interview questions across 10 tracks, answer out loud and see a structured answer to compare with yours. Free, no signup.
Try a practice question