Task 선언 2023.04.22 - [Airflow] with, @dag를 이용한 DAG 선언에서 데코레이터를 이용해 DAG를 생성하는 방법을 살펴봤는데, Task도 데코레이터를 이용해 선언할 수 있다. 다만 지금은 Python, SQL 함수에만 사용할 수 있는 것 같다. 이 글에서는 표준 생성자를 이용해 task가 선언된 DAG를 데코레이터를 이용해 task를 선언해 본다. 기존 선언 방식 기존에는 Task도 표준 생성자를 이용해 선언했다. from datetime import datetime, timedelta from airflow.decorators import dag from airflow.operators.python import PythonOperator from airflow.operat..