Andreas Nord
06/09/2022, 3:13 PMKevin Kho
set_upstream and upstream_tasks. For this. You can maybe just keep a list as you build your flow and then set
task_with_tag_2(..., upstream_tasks=[list_of_tag_one_items])Andreas Nord
06/09/2022, 3:18 PMKevin Kho
Andreas Nord
06/09/2022, 3:23 PMdef task1():
    # all tasks that had tag1
    task1a()
    task1b()
    ... 
# In flow:
task1()
task2(upstream_tasks=[task1])Kevin Kho
Andreas Nord
06/09/2022, 4:17 PMKevin Kho
def task1():
    # all tasks that had tag1
    a = task1a()
    b = task1b()
    ...
    return [a,b,c]
 
# In flow:
up = task1()
task2(upstream_tasks=up)
Which will surely work in Prefect 2. But it might already work in Prefect 1