Self-Assessment Quiz: Apache Airflow
Twenty questions. Aim for 16 or more. Questions 5, 6, and 17 are the three that decide whether your pipelines survive a retry.
Question 1
Cron stops being adequate at roughly:
- A. Ten tasks
- B. Three dependent steps, or when a step's duration varies enough that a fixed offset is a guess
- C. Any data pipeline
- D. When you need retries
Question 2
A DAG file is:
- A. The running pipeline
- B. A Python file parsed repeatedly by the scheduler — every 30 seconds by default
- C. Compiled once at deploy
- D. Executed by a worker
Question 3
Therefore, module-level code in a DAG file:
- A. Runs once
- B. Runs on the scheduler, every parse, forever
- C. Is ignored
- D. Runs on a worker
Question 4
A DAG with schedule="@daily" and a data interval of 2026-03-17 actually runs:
- A. At the start of 2026-03-17
- B. Just after midnight on 2026-03-18 — at the END of the interval
- C. Whenever a worker is free
- D. At noon on 2026-03-17
Question 5
datetime.now() inside a task means:
- A. Nothing, it works fine
- B. A retry processes a different window, and a rerun writes today's data into a historical partition
- C. The task runs slower
- D. Timezones are wrong
Question 6
data_interval_start and data_interval_end are:
- A. Recomputed on each attempt
- B. Stable across every retry and every rerun, forever
- C. Only available in Airflow 3
- D. The same as
datetime.now()
Question 7
catchup=True with a start_date two years old:
- A. Runs once
- B. Schedules 730 runs the moment you deploy it
- C. Is required
- D. Only affects the UI
Question 8
Which failure makes non-idempotency a certainty rather than a risk?
- A. A syntax error
- B. A write that succeeded and lost its acknowledgment, followed by a retry
- C. A slow query
- D. A full disk
Question 9
The right size for a task is:
- A. As small as possible
- B. One operator
- C. The smallest unit you would want to retry independently
- D. Under 100 lines
Question 10
A sensor with deferrable=False:
- A. Is faster
- B. Holds a worker slot for its entire wait
- C. Cannot time out
- D. Requires a triggerer
Question 11
An ExternalTaskSensor with no execution_delta:
- A. Waits for any run of the other DAG
- B. Looks for a run at the same logical date — and if the schedules differ, there is none
- C. Waits forever by design
- D. Is deprecated
Question 12
Datasets invert the dependency because:
- A. They are faster
- B. The producer declares what it produces and the consumer declares what it consumes; the schedule is derived
- C. They avoid the metadata database
- D. They only work cross-DAG
Question 13
Which limit is Chapter 20's lock against a backfill racing the nightly run?
- A.
parallelism - B.
max_active_tasks - C. A pool, plus
max_active_runs=1 - D.
retries
Question 14
In the §24.8 starvation incident, what failed?
- A. The backfill
- B. The nightly DAG
- C. Nothing — every task succeeded and the 6am SLA was missed by 41 minutes
- D. The scheduler
Question 15
Why would an Airflow task-level SLA miss not have fired there?
- A. SLAs were disabled
- B. No individual task was slow — the DAG was slow because it started late
- C. The SLA was too generous
- D. SLAs only apply to sensors
Question 16
XCom should carry:
- A. Whatever fits
- B. References — a path, an ID, a count. Anything you would not put in a log line does not go in it
- C. DataFrames, via a custom backend
- D. Nothing
Question 17
A task returning an 8.4 MB DataFrame twenty-four times a day for fourteen months produces:
- A. Slow tasks
- B. 83.9 GB in the shared metadata database, presenting as Airflow being broken
- C. A disk warning on the worker
- D. Nothing, XCom is compressed
Question 18
The test for whether logic belongs in the orchestrator:
- A. Is it Python?
- B. Could this run correctly outside Airflow?
- C. Is it under 50 lines?
- D. Does it need a connection?
Question 19
A scheduler that is not running produces:
- A. A failure alert
- B. No events at all — nothing runs and nothing fails
- C. Queued tasks
- D. An SLA miss
Question 20
The fix for that class of failure is:
- A. More alerts
- B. A heartbeat — something that must arrive, so its absence is an event — monitored from outside Airflow
- C. A second scheduler
- D. Longer retries
Answer Key
1. B — §24.1. And be honest about the cost: Kestrel's managed Airflow is $310 a month before any task runs.
2. B — §24.2.
3. B — §24.2. time python your_dag.py should be under a second.
4. B — §24.3. A run that processes a day's data cannot start until the day is over. The design is confusing and correct.
5. B — §24.3, and Case Study 1. 71,012 August rows in March partitions, $1,994,727 overstated.
6. B — §24.3. They are properties of the run, not of the moment — which is the whole point of the date model.
7. B — §24.4. Right for independent time windows; wrong for anything maintaining current state.
8. B — §24.5. It is the normal failure mode of a network, not an edge case.
9. C — §24.6. The unit of failure is the unit of design — and splitting costs a scheduling round trip per boundary.
10. B — §24.7. Sixteen sensors × 41 minutes = 656 slot-minutes a night out of 32 slots.
11. B — §24.7. It then times out reporting an upstream failure that did not happen. An offset between two cron expressions is a dependency waiting to be wrong.
12. B — §24.7. The same idea as ref() and TaskFlow's call structure, a third time.
13. C — §24.8. Both halves: the pool serializes across DAGs, max_active_runs=1 stops a DAG
joining itself.
14. C — §24.8. Chapter 23 §23.3's distinction, appearing in the orchestrator.
15. B — §24.8. A different measurement — put the SLA on the DAG's completion time.
16. B — §24.9.
17. B — Case Study 2. And airflow db clean had never run, because it is not on by default and is
in no getting-started guide.
18. B — §24.10. A @task should be four lines calling a library function.
19. B — §24.12 and Case Study 2. The absence of activity looks like an absence of work.
20. B — Case Study 2. Four lines of DAG, and the monitor must be outside Airflow — an alert Airflow sends you when Airflow is down is not an alert.
Topic map
| Missed | Reread |
|---|---|
| 1 | §24.1 — when cron stops |
| 2, 3 | §24.2 — the model, and parse time |
| 4, 5, 6 | §24.3 and Case Study 1 — the date model |
| 7 | §24.4 — catchup |
| 8, 9 | §24.5, §24.6 — idempotency and structure |
| 10, 11, 12 | §24.7 — sensors and datasets |
| 13, 14, 15 | §24.8 — pools and concurrency |
| 16, 17 | §24.9 and Case Study 2 — XCom |
| 18 | §24.10 — what belongs where |
| 19, 20 | §24.12 and Case Study 2 — how Airflow breaks |