0

有没有办法添加一个在所有其他任务在同一个 DAG 中成功运行后运行的任务,请参阅下面的我当前的 DAG。

例如,我当前的任务按以下顺序运行,但我想new_task在以下所有运行后添加。如果我将其保留为以下内容,它将无法运行new_task

for endpoint in ENDPOINTS:
      latest_only = (operator...)
      s3 = (operator...)
      etc ....


      latest_only >> s3 >> short_circuit
      short_circuit >> snowflake >> success
      short_circuit >> postgres >> success
      if endpoint.name == "io_lineitems":
        success >> il_io_lineitems_tables
copy_monthly_billing >> load_io_monthly_billing_to_snowflake
copy_monthly_billing >> load_io_monthly_billing_to_postgres
new_task
4

1 回答 1

0

使用触发规则根据上游任务成功状态触发 trigger_rules

于 2021-11-16T00:15:33.240 回答