0
0
Apache Airflowdevops~5 mins

ExternalTaskSensor for cross-DAG dependencies in Apache Airflow - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of the ExternalTaskSensor in Airflow?
ExternalTaskSensor waits for a task in a different DAG to complete before allowing the current DAG to proceed. It helps manage dependencies across DAGs.
Click to reveal answer
beginner
Which parameters are essential to configure an ExternalTaskSensor?
You must specify external_dag_id (the DAG to watch), external_task_id (the task to wait for), and optionally execution_date or use the default to match the current DAG's execution date.
Click to reveal answer
intermediate
How does ExternalTaskSensor handle execution dates by default?
By default, ExternalTaskSensor waits for the task in the external DAG that has the same execution date as the current DAG run.
Click to reveal answer
intermediate
What happens if the external task being waited on fails or never completes?
The ExternalTaskSensor will keep waiting until the task succeeds or the sensor times out or fails based on its timeout or retries settings.
Click to reveal answer
advanced
Can ExternalTaskSensor be used to wait for multiple tasks or DAGs?
ExternalTaskSensor can wait for multiple tasks in the same external DAG (by providing a list to external_task_id). For multiple DAGs, use multiple sensors or custom logic.
Click to reveal answer
What does ExternalTaskSensor primarily do in Airflow?
ASchedules DAG runs automatically
BTriggers a DAG run manually
CMonitors system resource usage
DWaits for a task in another DAG to complete
Which parameter tells ExternalTaskSensor which DAG to monitor?
Aexecution_date
Bexternal_task_id
Cexternal_dag_id
Dtask_id
By default, ExternalTaskSensor matches the external task's execution date with:
AThe current DAG run's execution date
BThe previous DAG run date
CThe current system date
DThe next scheduled DAG run date
If the external task never completes, what will ExternalTaskSensor do?
AFail immediately
BKeep waiting until timeout or success
CSkip the task
DTrigger the external task
Can ExternalTaskSensor wait for multiple tasks in different DAGs simultaneously?
ANo, it waits for one task in one DAG only
BYes, it supports multiple tasks natively
CYes, but only if tasks are in the same DAG
DNo, it only waits for tasks in the current DAG
Explain how ExternalTaskSensor helps manage dependencies between different DAGs in Airflow.
Think about how one DAG can pause until another DAG's task finishes.
You got /4 concepts.
    Describe what happens if the external task monitored by ExternalTaskSensor fails or never finishes.
    Consider sensor behavior on task failure or delay.
    You got /4 concepts.