In dagster, I have defined two operations, op1 and...
# dagster-feedback
u
In dagster, I have defined two operations, op1 and op2. In op1, I have computed a certain piece of data and I want to save it to the context. Then, in op2, I want to retrieve that data from the context. How can I do this?
c
I think you are looking for #dagster-support
u
Sorry, I will seek help in the dagster-support channel.
j
Hi, you don’t need to save the output to the context. Dagster works a lot like python in that you can return values from ops and pass them to other ops
Copy code
from dagster import job, op


@op
def return_five():
    return 5


@op
def add_one(arg):
    return arg + 1


@job
def do_stuff():
    add_one(return_five())