Defining an SLA
You've successfully implemented several Airflow workflows into production, but you don't currently have any method of determining if a workflow takes too long to run. After consulting with your manager and your team, you decide to implement an SLA at the DAG level on a test workflow.
All appropriate Airflow libraries have been imported for you.
Questo esercizio fa parte del corso
Introduction to Apache Airflow in Python
Istruzioni dell'esercizio
- Import the timedelta object.
- Define a
slaof 30 minutes. - Add the SLA to the DAG.
Esercizio pratico interattivo
Prova a risolvere questo esercizio completando il codice di esempio.
# Import the timedelta object
____
# Create the dictionary entry
default_args = {
'start_date': datetime(2024, 1, 20),
'____': ____
}
# Add to the DAG
test_dag = DAG('test_workflow', default_args=____, schedule_interval=None)