0
0
Apache Airflowdevops~5 mins

Timetables for complex schedules in Apache Airflow - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a Timetable in Apache Airflow?
A Timetable in Airflow defines when and how often a workflow (DAG) should run. It controls the schedule beyond simple cron expressions, allowing complex timing rules.
Click to reveal answer
intermediate
How does a Timetable differ from a cron schedule in Airflow?
A cron schedule is a simple string defining fixed times, while a Timetable is a Python class that can generate complex schedules dynamically, like irregular intervals or event-based triggers.
Click to reveal answer
intermediate
Which method must be implemented in a custom Airflow Timetable class?
The method 'next_dagrun_info' must be implemented. It returns the next scheduled run time and optional metadata for the DAG run.
Click to reveal answer
advanced
What is the role of 'logical_date' in Airflow Timetables?
The 'logical_date' represents the scheduled time for a DAG run, not the actual execution time. Timetables use it to calculate the next run time accurately.
Click to reveal answer
advanced
Give an example use case for a custom Timetable in Airflow.
When you need to run a DAG on complex patterns like 'every first Monday of the month' or 'only on business days excluding holidays', a custom Timetable can handle these rules.
Click to reveal answer
What does an Airflow Timetable primarily control?
AThe resources used by a DAG
BThe order of tasks inside a DAG
CWhen and how often a DAG runs
DThe logs generated by a DAG
Which method must a custom Timetable class implement?
Astart_dag
Bexecute_task
Cget_logs
Dnext_dagrun_info
What is the 'logical_date' in Airflow scheduling?
AThe scheduled time for a DAG run
BThe actual time a task starts
CThe time a DAG finishes
DThe current system time
Why use a custom Timetable instead of cron?
ATo handle complex or irregular schedules
BTo speed up task execution
CTo reduce memory usage
DTo change task dependencies
Which of these is NOT a feature of Airflow Timetables?
ADynamic schedule generation
BTask retry management
CSupport for complex calendar rules
DCustom logic for run times
Explain what an Airflow Timetable is and why you might create a custom one.
Think about when simple cron is not enough.
You got /3 concepts.
    Describe the role of the 'next_dagrun_info' method in a custom Timetable.
    This method is key to scheduling logic.
    You got /3 concepts.