Hello, I am looking to compose flows in Prefect, p...
# ask-community
e
Hello, I am looking to compose flows in Prefect, providing higher level flows to run. I have two options: • Depend on the python module where the subflows are implemented • Invoke subflows via API The first approach fundamentally bundle all the subflows and my higher level flow into a single flow on Prefect. It’s coupled, and it has the benefit that everything is in a single place. However, I might need to be careful in ensuring every time the subflows are updated, also the parent flow it’s released. My subflow are fundamentally a build-time dependency of my parent flow The second approach is to treat subflows as a runtime dependency, and try to see if they could be run using for example
run_deployment
passing the right parameter. This approach of runtime coupling ensure the parent flow always run the most updated version of the subflow. But I don’t even know if using this approach prefect will correctly link the subflow to its parent