BigData / Apache Airflow Interview Questions
What is the ExternalTaskSensor in Airflow?
The ExternalTaskSensor waits for a task in another DAG (or the DAG itself) to reach a target state (default: success) before proceeding. This enables cross-DAG dependencies without tight coupling.
from airflow.sensors.external_task import ExternalTaskSensor wait = ExternalTaskSensor( task_id='wait_for_upstream', external_dag_id='upstream_dag', external_task_id='final_task', mode='reschedule', timeout=3600 )
The sensor matches runs by execution_date by default. Use execution_date_fn or execution_delta when the upstream DAG runs on a different schedule.
More Related questions...