티스토리 뷰

728x90
def execute():
    if condition:
        raise AirflowSkipException

task = PythonOperator(task_id='task', python_callable=execute, dag=some_dag)

https://stackoverflow.com/questions/58414350/how-to-skip-task-in-airflow-operator

 

How to skip task in Airflow operator?

Is there a way for Airflow to skip current task from the PythonOperator? For example: def execute(): if condition: skip_current_task() task = PythonOperator(task_id='task', python_call...

stackoverflow.com

https://towardsdatascience.com/airflow-skip-task-a5a6ab319378

 

How to Skip Tasks in Airflow DAGs

Skipping tasks in Airflow DAGs based on specific conditions

towardsdatascience.com

 

728x90

'공부' 카테고리의 다른 글

[python] // (몫) 연산자  (0) 2023.04.28
[kotlin] MutableMap & MutableList (capacity: Int)  (0) 2023.04.26
[spark] dynamodb  (0) 2023.04.24
[python] pip3 install github  (0) 2023.04.24
[python] obj = os.environ; value=obj["value"]  (0) 2023.04.21
댓글