I am using Prefect 1.3.0 and am wondering how to p...
# ask-community
j
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
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
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
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
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
That's totally doable - just pass the run_config as part of the create_flow_run task and this will just work :)