# Initialise the metadatabase
airflow db init
# Reinitialize the metadatabase (Drop everything)
airflow db reset
# Upgrade the metadatabase
# when there is a upgrade in airflow version, and metadatabase schema is changed
airflow db upgrade
# start airflow webserver, scheduler
airflow scheduler &
airflow webserver &
# Start a Celery worker in distributed mode to spread tasks among nodes
airflow celery worker
# 모든 Dag 가져오기
airflow dags list
# trigger dag
airflow dags trigger example_bash_operator -e 2022-01-01
# information of all the DagRun of a certain dag
airflow dags list-runs -d example_bash_operator
# 한 Dag 안의 모든 task 가져오기
airflow tasks list dag_name
# Dag 안의 한 task만 실행, test 대신 run 들어가면 metadatbase에 기록 남음
airflow tasks test dag_name task_name 2022-01-01
# Dag의 모든 task 실행
airflow dags test dag_name 2022-01-01
# Backfill(2022-02-01부터 2022-02-01까지 모두 실행)
airflow dags backfill dag_name -s 2022-01-01 -e 2022-02-01