David Hogarty
04/28/2020, 1:55 PMnicholas
04/28/2020, 1:57 PMupstream_tasks
kwarg, which will explicitly set that dependency. You can read more about it here.David Hogarty
04/28/2020, 1:58 PMZachary Hughes
04/28/2020, 2:01 PMtask.set_upstream
to explicitly define which tasks are upstream and downstream of each other.
https://docs.prefect.io/api/latest/core/task.html#task-2David Hogarty
04/28/2020, 2:32 PMZachary Hughes
04/28/2020, 2:53 PMf = Flow(name="test")
t1 = Task()
t2 = Task()
t2.set_upstream(t1, flow=f)
or you can pass them in as arguments, like in this example:
with Flow("Example Flow") as flow:
task_a = task_a()
task_b = task_b(upstream_tasks=[task_a])
It really just depends on your style and use case. Sounds like you're on the right track, but don't hesitate to reach out if you have any more questions!