I see in the docs that in the newer versions of Da...
# ask-community
n
I see in the docs that in the newer versions of Dagster, you can specify config at the job and graph level instead of just at the op level. Does anyone have an example of what this looks like?
👀 1
c
Let's say I have the following op:
Copy code
@op(config_schema=str)
def my_op(context):
    ...
Then the following graph which contains the op can be configured like so:
Copy code
@graph(config={"my_op": {"config": "bar"}})
def my_graph():
    my_op()
For a job containing this op:
Copy code
@job(config={"ops": {"my_op": {"config": "bar"}}})
def my_job():
    my_op()
n
@chris Is it possible to specify a config value for a graph or job once and then have it propagate to all of the ops?
c
What do you mean by propagate in this context? As in, you provide one piece of config to the graph, and that config piece is passed to every single op?
n
yeah exactly
c
I think config mapping is what you want in that case. Let me know if you have further questions after checking out this doc.
👍 1
s
another way to make config available to every op inside a job is with a resource: https://docs.dagster.io/concepts/configuration/config-schema#passing-configuration-to-multiple-ops-in-a-job
2