https://prefect.io logo
v

Vitaly Shulgin

01/20/2021, 9:26 PM
Hello there, what is the right way to pass results from task to another as inpurt for run method, when task are dynamically added to edge?
So, having something like this
Copy code
with Flow("test") as flow:
    job_type = "play_serach_target"
    flow.add_edge(JobsExtract(play_type=job_type), JobsLoad(job_type))
where run method oj JobsExtract return list, and run method of JobsLoad accept list as argument
j

Jim Crist-Harif

01/20/2021, 9:28 PM
Hi Vitaly, you can do that by specifying the
key
kwarg to
add_edge
, which is the name of the parameter that edge maps to in the downstream task
run
method.
v

Vitaly Shulgin

01/21/2021, 6:22 AM
Thanks, @Jim Crist-Harif