Apache Airflow - trigger/schedule DAG rerun on completion (File Sensor)

后端 未结 2 1799
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-04 13:50

Good Morning.

I\'m trying to setup a DAG too

  1. Watch/sense for a file to hit a network folder
  2. Process the file
  3. Archive the file
2条回答
  •  面向向阳花
    2021-02-04 14:31

    Dmitris method worked perfectly.

    I also found in my reading setting schedule_interval=None and then using the TriggerDagRunOperator worked equally as well

    trigger = TriggerDagRunOperator(
        task_id='trigger_dag_RBCPV99_rerun',
        trigger_dag_id="RBCPV99_v2",
        dag=dag)
    
    sensor_task >> proccess_task >> archive_task >> trigger
    

提交回复
热议问题