Thread
#prefect-community
    Tim Enders

    Tim Enders

    8 months ago
    My brain is fried (yay Friday) and I can't seem to find this in the documentation. But how do I specify an upstream task explicitly when using the
    with Flow() as flow:
    pattern?
    Kevin Kho

    Kevin Kho

    8 months ago
    Like this?
    with Flow(...) as flow:
        a = task_a()
        b = task_b(upstream_tasks=[a])
    Tim Enders

    Tim Enders

    8 months ago
    thank you. I was looking for a function/method call
    Kevin Kho

    Kevin Kho

    8 months ago
    with Flow(...) as flow:
        a = task_a()
        b = task_b()
        b.set_upstream(a)
    Tim Enders

    Tim Enders

    8 months ago
    ok, so I can do it either way? Brilliant!
    Kevin Kho

    Kevin Kho

    8 months ago
    Yeah