0
0
Apache Airflowdevops~10 mins

Why scheduling automates pipeline execution in Apache Airflow - Test Your Understanding

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

Complete the code to set the schedule interval for an Airflow DAG.

Apache Airflow
dag = DAG('example_dag', schedule_interval=[1])
Drag options to blanks, or click blank then click option'
A'manual'
B'@daily'
CNone
D'@once'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'manual' disables scheduling, so the DAG won't run automatically.
2fill in blank
medium

Complete the code to import the scheduling module needed for Airflow DAGs.

Apache Airflow
from airflow.utils.[1] import utc
Drag options to blanks, or click blank then click option'
Atimezone
Bdates
Ctimedelta
Doperators
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing timedelta (duration) with timezone (time zone info).
3fill in blank
hard

Fix the error in the DAG definition to enable scheduling every hour.

Apache Airflow
dag = DAG('hourly_dag', schedule_interval=[1])
Drag options to blanks, or click blank then click option'
A'@daily'
B'hourly'
C'@hourly'
D'* * * * *'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'hourly' without '@' causes the scheduler to ignore the interval.
4fill in blank
hard

Fill both blanks to create a DAG that runs every 15 minutes and starts on January 1, 2024.

Apache Airflow
dag = DAG('quarter_hour_dag', schedule_interval=[1], start_date=[2])
Drag options to blanks, or click blank then click option'
A'*/15 * * * *'
Bdatetime(2024, 1, 1)
Cdatetime(2023, 12, 31)
D'@daily'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a string for start_date instead of a datetime object.
5fill in blank
hard

Fill all three blanks to define a DAG with a daily schedule, a start date of March 1, 2024, and catchup disabled.

Apache Airflow
dag = DAG('daily_dag', schedule_interval=[1], start_date=[2], catchup=[3])
Drag options to blanks, or click blank then click option'
A'@daily'
Bdatetime(2024, 3, 1)
CFalse
DTrue
Attempts:
3 left
💡 Hint
Common Mistakes
Setting catchup to True causes the DAG to run all past missed intervals.