Google cloud platform 气流操纵器';图上的s上游没有详细的上游列表
我有一个任务ID[['a','B'],['C','D']的依赖项列表,这将导致以下流: A>>B C>>D 它通常在['A'、'B']['C'、'B']]情况下工作,这将导致操作符A和C结束,而不是执行B。 以下是如何创建依赖项:Google cloud platform 气流操纵器';图上的s上游没有详细的上游列表,google-cloud-platform,airflow,Google Cloud Platform,Airflow,我有一个任务ID[['a','B'],['C','D']的依赖项列表,这将导致以下流: A>>B C>>D 它通常在['A'、'B']['C'、'B']]情况下工作,这将导致操作符A和C结束,而不是执行B。 以下是如何创建依赖项: for dep in dependencies_list: for i in range(len(dep)-1): task_id_update = "update_bq_ts_{}".format(dep[i])
for dep in dependencies_list:
for i in range(len(dep)-1):
task_id_update = "update_bq_ts_{}".format(dep[i])
task_id_start = "start_df_pipeline_{}".format(dep[i+1])
last_ops[task_id_update] >> first_ops[task_id_start]
字典last_ops和first_ops是key:str(task_id)value:Operator
B运算符(启动\u df\u管道\u*)定义如下所示:
def start_pipeline(dag, pipeline_name, runtime_args):
return CloudDataFusionStartPipelineOperator(
task_id='start_df_pipeline_{pipeline_name}',
instance_name=instance_name,
location=location,
pipeline_name=pipeline_name,
runtime_args=runtime_args,
trigger_rule="all_success"
)
在图表视图中,它正确显示了相关性:
如果我打开strat_df_pipeline_*任务的任务实例详细信息,则上游列表为空
当我运行整个DAG时,它会执行start_df_pipeline_*而不是等待两个update_bq_*完成