Hey Guys
I want to setup a flow dependency for my task, basically I am running a flow, inside which I have a flow which downloads some data and then after this data has been downloaded I want to run some tasks, but when I try to do so the download flow runs successfully but the tasks after that end up failing, any idea why could that be happening and how can I fix it?
a
Anna Geller
05/04/2022, 12:17 PM
This is the default behavior in Prefect that, once you set dependencies between tasks, downstream tasks run only when upstream tasks are finished successfully.
Example:
Copy code
from prefect import task, Flow
@task
def task_1():
pass
@task
def task_2():
pass
@task
def task_3():
pass
with Flow("flow_with_dependencies") as flow:
t1 = task_1()
t2 = task_2(upstream_tasks=[t1])
t3 = task_3(upstream_tasks=[t2])
a
Abuzar Shaikh
05/04/2022, 12:19 PM
In my case the upstream task is actually a flow, for which I have certain downstream tasks that will run once it is completed
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.