0
0
Apache Airflowdevops~10 mins

Why cloud operators simplify infrastructure tasks 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 import the Airflow DAG class.

Apache Airflow
from airflow.[1] import DAG
Drag options to blanks, or click blank then click option'
Amodels
Boperators
Chooks
Dexecutors
Attempts:
3 left
💡 Hint
Common Mistakes
Importing DAG from airflow.operators instead of airflow.models.
2fill in blank
medium

Complete the code to set the default arguments for the DAG.

Apache Airflow
default_args = {'owner': 'airflow', 'start_date': [1](2024, 1, 1)}
Drag options to blanks, or click blank then click option'
Adateutil
Btimedelta
Cdatetime
Dtime
Attempts:
3 left
💡 Hint
Common Mistakes
Using timedelta instead of datetime for start_date.
3fill in blank
hard

Fix the error in the DAG definition by completing the missing argument.

Apache Airflow
dag = DAG('example_dag', default_args=default_args, schedule_interval=[1])
Drag options to blanks, or click blank then click option'
A'@daily'
Bstart_date
Ctimedelta(days=1)
DNone
Attempts:
3 left
💡 Hint
Common Mistakes
Using timedelta object instead of a cron string for schedule_interval.
4fill in blank
hard

Fill both blanks to create a simple task using BashOperator.

Apache Airflow
from airflow.operators.bash import [1]
task1 = [2](task_id='print_date', bash_command='date', dag=dag)
Drag options to blanks, or click blank then click option'
ABashOperator
BPythonOperator
CEmailOperator
DDummyOperator
Attempts:
3 left
💡 Hint
Common Mistakes
Using PythonOperator or EmailOperator instead of BashOperator for bash commands.
5fill in blank
hard

Fill all three blanks to set task dependencies so task1 runs before task2 and task3.

Apache Airflow
task1 [1] task2
 task1 [2] task3
 task2 [3] task3
Drag options to blanks, or click blank then click option'
A>>
B<<
C==
D!=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<<' or '==' which do not set dependencies correctly.