Created
August 27, 2020 21:43
-
-
Save anna-anisienia/270223379a600b164fdd9970f08f14a8 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
from prefect.tasks.prefect.flow_run import FlowRunTask | |
from prefect import Flow | |
from prefect.schedules import Schedule | |
from prefect.schedules.clocks import CronClock | |
schedule_parent_flow = Schedule(clocks=[CronClock("0 2 * * *")]) | |
with Flow("MasterFlow", schedule=schedule_parent_flow) 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