Skip to content

Instantly share code, notes, and snippets.

@anna-anisienia
Created August 27, 2020 20:59
Show Gist options
  • Save anna-anisienia/05805b5473fbd691e9958c6fe163b461 to your computer and use it in GitHub Desktop.
Save anna-anisienia/05805b5473fbd691e9958c6fe163b461 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("MasterFlow") 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