Created
August 27, 2020 20:42
-
-
Save anna-anisienia/45932a3e3982ca94de4aa7b2f61d7af1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" 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