Is it possible for a prefect flow to spin up a dyn...
# ask-community
f
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
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
Awesome, that makes sense - thanks!