Get startedGet started for free

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.

This exercise is part of the course

Introduction to Apache Airflow in Python

View Course

Exercise instructions

  • Import the timedelta object.
  • Define a sla of 30 minutes.
  • Add the SLA to the DAG.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# 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)
Edit and Run Code