Complete the code to set the default start date for the DAG.
default_args = {
'start_date': [1]
}The start_date in default_args must be a datetime object specifying when the DAG should start running.
Complete the code to set the DAG's schedule interval to run daily.
dag = DAG(
'example_dag',
default_args=default_args,
schedule_interval=[1]
)The schedule_interval set to '@daily' makes the DAG run once every day.
Fix the error in setting the default retry delay to 5 minutes.
default_args = {
'retry_delay': [1]
}The retry_delay must be a timedelta object specifying the delay duration. Use timedelta(minutes=5) for 5 minutes.
Fill both blanks to create a DAG with default args and a weekly schedule.
dag = DAG(
'weekly_dag',
default_args=[1],
schedule_interval=[2]
)Use the default_args dictionary for default arguments and set schedule_interval to '@weekly' for weekly runs.
Fill all three blanks to define default args with retries and create a DAG with a monthly schedule.
default_args = {
'start_date': [1],
'retries': [2],
'retry_delay': [3]
}
dag = DAG(
'monthly_dag',
default_args=default_args,
schedule_interval='@monthly'
)Set start_date to a fixed datetime, retries to an integer count, and retry_delay to a timedelta for delay duration.