Airflow - 创建在所有其他任务 运行 成功后运行的任务
Airflow - create task that runs once all other tasks ran successfully
有没有办法在同一 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
使用触发规则根据上游任务成功状态触发
trigger_rules
有没有办法在同一 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
使用触发规则根据上游任务成功状态触发 trigger_rules