Skip to content

Instantly share code, notes, and snippets.

@anna-anisienia
Created August 27, 2020 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anna-anisienia/45932a3e3982ca94de4aa7b2f61d7af1 to your computer and use it in GitHub Desktop.
Save anna-anisienia/45932a3e3982ca94de4aa7b2f61d7af1 to your computer and use it in GitHub Desktop.
""" Trigger child Flows from this parent Flow """
from prefect.tasks.prefect.flow_run import FlowRunTask
from prefect import Flow
with Flow("FlowRunTask_Example") as flow:
staging_area = FlowRunTask(flow_name='staging_area',
project_name="InterFlow_Dependencies",
wait=True)
business_logic_layer = FlowRunTask(flow_name='business_logic_layer',
project_name="InterFlow_Dependencies",
wait=True)
data_mart = FlowRunTask(flow_name='data_mart',
project_name="InterFlow_Dependencies",
wait=True)
staging_area.set_downstream(business_logic_layer)
business_logic_layer.set_downstream(data_mart)
if __name__ == '__main__':
flow.register("InterFlow_Dependencies")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment