Nadav
09/15/2021, 9:45 PMKevin Kho
@task()
def abc(x):
return {"a": 1, "b": 2}
with Flow("test") as flow:
a = abc(1)
test = a["a"]
flow.run()
Kevin Kho
@task()
def abc(x):
return {"a": 1, "b": 2}
@task()
def bcd(x):
return x
with Flow("test") as flow:
a = abc(1)
test = a["a"]
bcd(a["b"])
flow.run()
Kevin Kho
[]
for a task calls the built-in Prefect GetItem
taskNadav
09/15/2021, 9:58 PM@task
def a():
return {'list_key':['item1',item2']}
with Flow('test') as flow:
t = a()
li = t['list_key']
for item in li:
do_something(item1
)Nadav
09/15/2021, 9:58 PMKevin Kho
.map()
instead to loop. And then you need to unpack this yep.