有没有办法添加一个在所有其他任务在同一个 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