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/f98df4b86c810d2d3354e90248660842 to your computer and use it in GitHub Desktop.
Save anna-anisienia/f98df4b86c810d2d3354e90248660842 to your computer and use it in GitHub Desktop.
from prefect import task, Flow
@task(log_stdout=True)
def bus_logic_etl_1():
print("Executing bus_logic_etl_1")
@task(log_stdout=True)
def bus_logic_etl_2():
print("Executing bus_logic_etl_2")
@task(log_stdout=True)
def bus_logic_etl_3():
print("Executing bus_logic_etl_3")
with Flow("business_logic_layer") as flow:
etl_1 = bus_logic_etl_1()
etl_2 = bus_logic_etl_2()
etl_3 = bus_logic_etl_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