Hi, I was wondering what's the most elegant way to...
# announcements
d
Hi, I was wondering what's the most elegant way to define a config parameter shared by several solids in a pipeline. I want to avoid defining the same parameter for each solid just to set the same value over and over again in the config. I also don't want to combine all solids using the same parameter into a composite solid. Passing the parameter from one solid to another is also not an option. Intuitively this would mean either defining a pipeline config parameter which can be accessed from the context by each solid (thus excluding this parameter from the solids' config schema), or keeping the parameter in each solid's config schema and referencing a pipeline-wide value in each of the solids. Not sure if I missed something but I think I haven't seen this in the tutorial or any of the examples.
a
creating a
resource
that effectively wraps the config value is the probably the best way to
defining a pipeline config parameter which can be accessed from the context by each solid
s
Hey Daniel - here's a code example that might be helpful: https://github.com/dagster-io/dagster/discussions/3213
👍 1
d
Thanks, I also considered this solution but I completely agree that the proposed
@graph
approach will probably make this much nicer and more intuitive to handle. For now, I'll just collect all pipeline configs in a resource 👍