Heeje Cho

02/25/2022, 12:34 AM
I am a little bit confused at the way prefect treats mapping. If you map to an empty list/tuple do no child tasks get created and the task is skipped? Or is are all child tasks failed automatically?

Kevin Kho

02/25/2022, 1:53 AM
I think the task is skipped but you can still trigger downstream
from prefect import Flow, task, unmapped

def task_a(x):
    return x+1

def task_b(x):
    return x+1

with Flow("...") as flow:
    a =[])
    b =[0,1,2], upstream_tasks=[unmapped(a)])