MulaiMulai sekarang secara gratis

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.

Latihan ini adalah bagian dari kursus

Introduction to Apache Airflow in Python

Lihat Kursus

Petunjuk latihan

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

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# 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 dan Jalankan Kode