Skip to content

Instantly share code, notes, and snippets.

@anna-anisienia
Created August 27, 2020 20:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anna-anisienia/7797e96981ed27c2e32fa32ef96b8a7e to your computer and use it in GitHub Desktop.
Save anna-anisienia/7797e96981ed27c2e32fa32ef96b8a7e to your computer and use it in GitHub Desktop.
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