Created
August 27, 2020 20:44
-
-
Save anna-anisienia/7797e96981ed27c2e32fa32ef96b8a7e 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 stage_1(): | |
print("Executing stage_1") | |
@task(log_stdout=True) | |
def stage_2(): | |
print("Executing stage_2") | |
@task(log_stdout=True) | |
def stage_3(): | |
print("Executing stage_3") | |
with Flow("staging_area") as flow: | |
etl_1 = stage_1() | |
etl_2 = stage_2() | |
etl_3 = stage_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