https://prefect.io logo
Title
j

Jacqueline Riley Garrahan

08/10/2022, 11:48 PM
I am using Prefect 1.3.0 and am wondering how to propagate a run_config environment to subflows in a flow of flows setup. Is there any way to do this for already-registered sub flows?
m

Matt Conger

08/11/2022, 12:34 AM
Hi, here is some documentation on running dependent flows with Prefect 1.0 that may be helpful! https://docs-v1.prefect.io/core/idioms/flow-to-flow.html
j

Jacqueline Riley Garrahan

08/11/2022, 9:08 PM
Hi @Matt Conger thanks for the reference. The docs don't handle the propagation of run_configs to create_flow_run. In my case, I have an environment that configures a set of services, so would need to pass them to each of the create_flow_run tasks somehow...
m

Matt Conger

08/11/2022, 11:32 PM
This seems to have a similar solution to what you are looking for Jacqueline. Let me know if this helps out at all. If not, I can look deeper into this. What is your use case for propagating the run_config environment to subflows? https://www.prefect.io/guide/blog/flow-of-flows-orchestrating-elt-with-prefect-and-dbt/
j

Jacqueline Riley Garrahan

08/12/2022, 5:32 PM
Hi Matt- this isn't quite it... My use case is that I have several subflows requiring environment variables for configuring connections to external service. I want to pass those environment variables from the flow-of-flows run into the subflows at runtime.
a

Anna Geller

08/12/2022, 10:44 PM
That's totally doable - just pass the run_config as part of the create_flow_run task and this will just work :)