Koen
02/11/2025, 2:57 PMMarvin
02/11/2025, 2:57 PMflow
decorator to define a flow, and then calling one flow from within another. The parent flow can wait for a subflow to complete before proceeding, effectively creating a dependency.
Here's a basic example:
python
from prefect import flow
@flow
def subflow_1():
print("Running Subflow 1")
@flow
def subflow_2():
print("Running Subflow 2")
@flow
def parent_flow():
subflow_1()
subflow_2()
parent_flow()
In this example, subflow_1
will run before subflow_2
because they are called in sequence inside parent_flow
. This is a simple way to manage dependencies between subflows.
For more detailed information, you can refer to the Prefect documentation.
If you have specific requirements or a more complex scenario, feel free to share.Koen
02/11/2025, 2:58 PMMarvin
02/11/2025, 2:59 PMvisualize_task_dependencies
function can help visualize task dependencies if tasks are interconnected within a flow.
For further details, you can explore the Prefect documentation.
If you need more specific guidance on how to structure your flows to visualize dependencies, feel free to provide more context.