Recall & Review
beginner
What is the purpose of the Airflow CLI command
airflow tasks test?It runs a single task instance for a specific DAG and execution date without scheduling. This helps to debug the task by executing it immediately and seeing the output.
Click to reveal answer
beginner
How can you view the logs of a specific task instance using Airflow CLI?
Use the command
airflow tasks logs <dag_id> <task_id> <execution_date> to fetch and display the logs for that task instance.Click to reveal answer
beginner
What does the Airflow CLI command
airflow dags list do?It lists all the DAGs currently available in Airflow. This helps to confirm if your DAG is recognized by Airflow before debugging tasks.
Click to reveal answer
intermediate
Which Airflow CLI command helps you to clear the state of a task instance to rerun it?
The command
airflow tasks clear <dag_id> <task_id> --start-date <date> --end-date <date> clears the task state, allowing it to be rerun.Click to reveal answer
intermediate
Why is it useful to run
airflow tasks test instead of triggering the whole DAG?Running
airflow tasks test isolates the task execution, so you can quickly debug and fix issues without waiting for the entire DAG to run or affect downstream tasks.Click to reveal answer
Which command shows logs for a specific Airflow task instance?
✗ Incorrect
The command 'airflow tasks logs' fetches logs for the specified task instance.
What does
airflow tasks test do?✗ Incorrect
It runs a single task instance immediately without scheduling, useful for debugging.
How do you clear a task's state to rerun it?
✗ Incorrect
The 'airflow tasks clear' command clears the task state so it can be rerun.
Which command lists all DAGs in Airflow?
✗ Incorrect
'airflow dags list' shows all DAGs available in Airflow.
Why is running a single task with
airflow tasks test helpful?✗ Incorrect
It helps debug a single task quickly without running the entire DAG.
Explain how you would debug a failing task in Airflow using the CLI.
Think about running, checking logs, and resetting task state.
You got /4 concepts.
Describe the steps to view logs and rerun a task in Airflow CLI.
Focus on commands for logs, clearing, and testing tasks.
You got /3 concepts.