BaşlayınÜcretsiz Başlayın

Defining a task SLA

After completing the SLA on the entire workflow, you realize you really only need the SLA timing on a specific task instead of the full workflow.

The appropriate Airflow libraries are imported for you.

Bu egzersiz

Introduction to Apache Airflow in Python

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Import the timedelta object.
  • Add a 3 hour sla to the task.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Import the timedelta object
____

test_dag = DAG('test_workflow', start_date=datetime(2024,1,20), schedule_interval=None)

# Create the task with the SLA
task1 = BashOperator(task_id='first_task',
                     ____=____,
                     bash_command='initialize_data.sh',
                     dag=test_dag)
Kodu Düzenle ve Çalıştır