How to Run a Simple Airflow DAG

前端 未结 2 1002
名媛妹妹
名媛妹妹 2020-12-28 19:03

I am totally new to Airflow. I would like to run a simple DAG at a specified date. I\'m struggling to make difference between the start date, the execution date, and backfil

2条回答
  •  囚心锁ツ
    2020-12-28 19:30

    difference between the start date ,the execution date and backfilling

    Backfilling is done to run DAG explicitly to test/manually run DAG/re run a DAG which error-ed out. You do this using CLI

    airflow backfill -s <> <> 
    #optionally provide -1 as start_date to run it immediately
    

    start_date is, as the name suggests, date from when the DAG definition is valid

    execution_date is the date-time when it is to be run. This you provide while testing individual tasks of DAG as below

    airflow test <> <> <>
    

    what is the command to run the dag

    Backfill is the command to run DAG explicitly. Otherwise you just put the DAG in the DAGBAG folder and the scheduler will run it as per the schedule defined in the DAG definition

    airflow backfill -s <> <> 
    #optionally provide -1 as start_date to run it immediately
    

提交回复
热议问题