Created
August 27, 2020 20:45
-
-
Save anna-anisienia/0263bcfe2671ca25123ff7c731e5f378 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 import task, Flow | |
@task(log_stdout=True) | |
def data_mart_1(): | |
print("Executing data_mart_1") | |
@task(log_stdout=True) | |
def data_mart_2(): | |
print("Executing data_mart_2") | |
@task(log_stdout=True) | |
def data_mart_3(): | |
print("Executing data_mart_3") | |
with Flow("data_mart") as flow: | |
etl_1 = data_mart_1() | |
etl_2 = data_mart_2() | |
etl_3 = data_mart_3() | |
etl_1.set_downstream(etl_2) | |
etl_2.set_downstream(etl_3) | |
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