https://prefect.io logo
f

Frank Oplinger

01/18/2022, 10:05 PM
Is it possible for a prefect flow to spin up a dynamic number of other flows based on the output of a task? I see in these docs some examples of spinning up a static number of flows but I would love to have the number of children flows vary from run to run.
e

emre

01/18/2022, 11:27 PM
Yup!
create_flow_run
is just like any other prefect task, meaning it can be mapped. So a task would output a list, and you would use
create_flow_run.map
to map over that list. That would spin up as many flows as the length of your output list.
f

Frank Oplinger

01/18/2022, 11:32 PM
Awesome, that makes sense - thanks!
6 Views