Challenge - 5 Problems
Airflow Log Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
Identify the output of the Airflow CLI log command
You run the command
airflow tasks logs example_dag example_task 2024-06-01. What will this command output?Attempts:
2 left
💡 Hint
The command
airflow tasks logs shows logs for a specific task instance.✗ Incorrect
The
airflow tasks logs command fetches logs for a specific task in a DAG for a given execution date. It does not list DAGs or task statuses.❓ Troubleshoot
intermediate2:00remaining
Troubleshoot missing logs in Airflow UI
You notice that the Airflow web UI shows
No logs found for a task that ran successfully. What is the most likely cause?Attempts:
2 left
💡 Hint
Check where Airflow stores logs and if the UI can access that location.
✗ Incorrect
If logs are stored remotely (e.g., S3, GCS) but the UI is not configured with the right connection, it will show no logs even if the task ran.
❓ Configuration
advanced3:00remaining
Configure Airflow to store logs remotely on Amazon S3
Which configuration snippet correctly sets Airflow to store logs on Amazon S3?
Attempts:
2 left
💡 Hint
Remote logging settings belong under the [logging] section.
✗ Incorrect
To enable remote logging to S3, set
remote_logging = True under [logging], specify the S3 connection ID, and the S3 bucket path.🔀 Workflow
advanced2:30remaining
Steps to troubleshoot a failing Airflow task using logs
What is the correct order of steps to troubleshoot a failing Airflow task using logs?
Attempts:
2 left
💡 Hint
Start by looking at logs, then find the error, then fix it.
✗ Incorrect
The logical troubleshooting flow is to first check logs, find the error, understand the cause, then fix and rerun.
✅ Best Practice
expert3:00remaining
Best practice for managing Airflow logs in a production environment
Which option is the best practice for managing Airflow logs in a production environment with many DAGs and tasks?
Attempts:
2 left
💡 Hint
Think about scalability, reliability, and ease of access.
✗ Incorrect
Remote logging to centralized storage with rotation is scalable, reliable, and makes logs accessible from anywhere.