In the functional flow context, how does one use `...
# ask-community
m
In the functional flow context, how does one use
.set_upstream
to create a relationship between two tasks, where the downstream task doesn't care about the upstream's (in-band) results? The docs say it's possible, but I end up with two copies of the downstream task when doing what seems like the obvious.
k
Hey @Michael Warnock, are you doing something like this (either work)?
Copy code
@task()
def abc(a):
    return a

with Flow("ecs_testing") as flow:
    x = abc(1)
    y = abc(1, upstream_tasks=[x])

with Flow("ecs_tes") as flow2:
    x = abc(1)
    y = abc(1)
    y.set_upstream(x)
m
I was doing something more like:
Copy code
with Flow("test") as flow:
  x = task3()
  task4.set_upstream(x)
  task4.map(y)
so I think I see the problem(s). And thanks for the way you did the first case, which I find much more aesthetically pleasing.
👍 1