I find myself doing order-based dependencies on oc...
# dagster-feedback
s
I find myself doing order-based dependencies on occasion, where I have to do some sort of environment manipulation -- like, write an SSH key to file in the container, or populate an environment variable. In Prefect, there's a built-in function that you can do called
depends_on
, and it operates basically like an always-present Nothing input, a la --
@op(ins={"depends_on": In(Nothing)})
, which you can pass a list of outputs from other ops to. Anyway, suggestion would be to do the same thing in Dagster to make order-based dependencies really intuitive to implement:
Copy code
@op
def set_up_env_op():
    pathlib.Path("foo").write_text("bar")
    return True

@op
def run_main_op()
    print("something that depends on the first thing being done.")

@job
def my_job():
    done = set_up_env_op()
    run_main_op(depends_on=[done])
👍 3
m
Yes, it would be nice not to have to declare the
start
input explicitly, and just always have it as an option.
y
@Dagster Bot issue Consider to accept a list of upstream outputs for Nothing dependency
d
y
I think it’s a great idea - filing an issue for tracking this feature request!
ty thankyou 1