0
0
Apache Airflowdevops~10 mins

Catchup and backfill behavior in Apache Airflow - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to disable catchup in an Airflow DAG.

Apache Airflow
dag = DAG('example_dag', catchup=[1])
Drag options to blanks, or click blank then click option'
ATrue
B'False'
CFalse
Dnone
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'False' as a string instead of the boolean False.
2fill in blank
medium

Complete the code to set the start date for an Airflow DAG to January 1, 2023.

Apache Airflow
dag = DAG('example_dag', start_date=datetime([1]))
Drag options to blanks, or click blank then click option'
A2023, 1, 1
B2023, 12, 31
C2024, 1, 1
D2022, 1, 1
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong year or month values.
3fill in blank
hard

Fix the error in the DAG definition to enable backfill for missed runs.

Apache Airflow
dag = DAG('example_dag', catchup=[1])
Drag options to blanks, or click blank then click option'
AFalse
BTrue
CNone
D'True'
Attempts:
3 left
💡 Hint
Common Mistakes
Using string 'True' instead of boolean True.
4fill in blank
hard

Fill both blanks to create a DAG that starts on March 1, 2023 and disables catchup.

Apache Airflow
dag = DAG('example_dag', start_date=datetime([1]), catchup=[2])
Drag options to blanks, or click blank then click option'
A2023, 3, 1
BFalse
CTrue
D2023, 1, 1
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the date or using catchup=True by mistake.
5fill in blank
hard

Fill all three blanks to define a DAG with start date April 10, 2023, catchup enabled, and schedule interval daily.

Apache Airflow
dag = DAG('example_dag', start_date=datetime([1]), catchup=[2], schedule_interval=[3])
Drag options to blanks, or click blank then click option'
A2023, 4, 10
BTrue
C'@daily'
DFalse
Attempts:
3 left
💡 Hint
Common Mistakes
Using catchup=False when backfill is needed.
Wrong schedule interval string.