Airflow2 [Airflow] PythonOperator에 arugments 넘기기 op_kwargs 와 op_args 이용 두 개의 차이는 op_kwargs는 dict이고 op_args는 list이다. PythonOperator def __init__( self, *, python_callable: Callable, op_args: Optional[List] = None, op_kwargs: Optional[Dict] = None, templates_dict: Optional[Dict] = None, templates_exts: Optional[List[str]] = None, **kwargs, ) op_args 이용 from datetime import datetime from airflow import DAG from airflow.operators.dummy import Dumm.. 2021. 8. 7. [Airflow] Task 재실행하기 Airflow 이용하다 보면 특정 task를 다시 실행하고 싶은 경우들이 있다. Task를 재실행하는 법에 대해서 알아보자. Airflow UI 이용 Airflow UI에 접속해서 재실행할 DAG를 클릭하자. Graph View를 클릭하자. 재실행할 Task 클릭하자. Task를 클릭하면 아래와 같은 창이 뜬다. 원하는 옵션을 선택하고 Clear를 클릭하자. Clear를 클릭하면 재실행할 Task를 확인할 수 있다. 맞으면 OK를 클릭해서 Task를 재실행하자. Airflow CLI 이용 command line 이용해서도 동일하게 할 수 있다. airflow tasks clear command를 이용하면 된다. 옵션을 잘 모르겠으면 help 명령어로 사용법을 확인해보자. airflow tasks clea.. 2021. 8. 6. 이전 1 다음