Airflow Scenarios, Labs, Gotchas, and Mock Interview
Answer First: Airflow scenarios are answered by naming the data interval, the dependency graph, the retry/idempotency policy, and the operational signal you will monitor.
Memory Map: scenario -> data window -> task graph -> dependency rule -> retry guard -> monitor.
Minimal DAG with XCom
Answer First: A three-task extract-transform-load DAG proves dependency order, task instance states, XCom visibility, and UI-driven inspection.
Memory Map: extract task -> XCom row -> transform task -> load task -> UI inspection -> small payload rule.
Dynamic task mapping lab
Answer First: Dynamic task mapping expands one task definition into one task instance per input item at run time.
Memory Map: list files -> expand inputs -> parallel task instances -> mapped state -> fan-out without boilerplate.
Use mapping when cardinality is known only when the DAG run executes.
Task state machine
Answer First: Task instances move from scheduled to queued to running to success, failure, retry, skip, or reschedule; the state tells you which subsystem to debug.
Memory Map: scheduled -> queued -> running -> success/failure -> retry/reschedule -> subsystem clue.
State literacy is an interview superpower: "queued" points to capacity; "up_for_reschedule" points to sensor behavior.
Production gotchas
Answer First: Common Airflow failures come from giant XComs, heavy parse-time code, deprecated schedule style, accidental catchup floods, slot-blocking sensors, and timezone assumptions.
Memory Map: metadata bloat -> scheduler parse freeze -> schedule API drift -> catchup flood -> worker slot starvation -> timezone mismatch.
Daily ETL scenario
Answer First: A strong daily ETL design names the schedule, catchup stance, API connection, validation, transformation, warehouse load, quality check, retry policy, and alert path.
Memory Map: daily schedule -> API connection -> validate -> transform -> load -> quality check -> alert.
Keep credentials in Connections, use TaskFlow for readable Python, and put alerting on the failure callback.
Final readiness checklist
Answer First: The Airflow interview checklist is time semantics, scheduler pipeline, executors, XCom limits, trigger rules, sensors, catchup, mapping, retries, and debugging.
Memory Map: time semantics -> scheduler path -> executor choice -> XCom limit -> trigger rules -> sensor mode -> retry debug.
If you can explain every item without looking, you can survive most Airflow rounds.