Airflow Interview Q&A
Covers DAGs, operators, task dependencies, scheduling, retries, and pipeline orchestration best practices.
Source: GOLDEN_QUESTIONNAIRE_JULY_2026.pdf • Answers are hidden — click a question to reveal its full interview answer. Use bookmarks + Mark as Complete to track prep.
What is a DAG in Apache Airflow? How does it work?
click to reveal answerInterview Answer: A DAG (Directed Acyclic Graph) is a workflow that defines the sequence of tasks in Apache Airflow. Each task represents a step in the pipeline, and dependencies decide the execution order. Airflow schedules the DAG, executes the tasks, and monitors their status. I use DAGs to automate ETL pipelines.
What is XCom (Cross-Communication) in Airflow? How do you use xcom_push and xcom_pull?
click to reveal answerInterview Answer: XCom (Cross-Communication) is used to share small amounts of data between Airflow tasks. xcom_push() stores a value from one task, and xcom_pull() retrieves that value in another task. I use XCom to pass file names, IDs, or status information between tasks.
# Task 1
ti.xcom_push(key="file_name", value="sales.csv")
# Task 2
file = ti.xcom_pull(key="file_name")
What are the different ways to trigger a DAG in Airflow?
click to reveal answerInterview Answer: A DAG can be triggered in multiple ways. It can run on a schedule using cron expressions, be triggered manually from the Airflow UI, through the Airflow CLI, using the REST API, or by another DAG using TriggerDagRunOperator. The method depends on the project requirement.
How does Airflow handle task retries?
click to reveal answerInterview Answer: If a task fails, Airflow can retry it automatically based on the retry configuration. We define the number of retries and the retry delay in the DAG. If the task still fails after all retries, it is marked as failed and alerts can be sent.
Difference between Airflow vs Step Functions
click to reveal answerInterview Answer: Apache Airflow is mainly used for scheduling and orchestrating ETL and data pipelines. AWS Step Functions are used to coordinate AWS services like Lambda, Glue, and ECS in serverless workflows. I use Airflow for complex data workflows and Step Functions for AWS event-driven applications.
How do you define dependencies in Airflow DAGs?
click to reveal answerInterview Answer: Dependencies define the order in which tasks run. In Airflow, I use >> or << operators, or methods like set_upstream() and set_downstream(). This ensures that one task starts only after the previous task completes successfully.
task1 >> task2 >> task3
or
task2.set_upstream(task1)
task2.set_downstream(task3)