Samuel Tober
08/04/2021, 8:05 AMKevin Kho
Samuel Tober
08/04/2021, 1:47 PMKevin Kho
from prefect import task, Flow
@task
def abc(x):
return [x, x+1]
@task
def bcd(y):
return y + 1
@task
def cde(z):
# z is two elements so we would want a map
# but we cant here
out = []
for _ in z:
bcd.run(_)
out.append(_)
return out
with Flow("a") as flow:
items = [1,2,3,4]
a = abc.map(items)
b = cde.map(a)
flow.run()