https://dagster.io/ logo
Title
j

jay

09/16/2021, 7:12 PM
I am passing a
run_config
in to my pipeline as shown here: https://docs.dagster.io/concepts/configuration/config-schema It has following snipped of code as an example:
execute_pipeline(
        config_example_pipeline,
        run_config={"solids": {"config_example_solid": {"config": {"iterations": 1}}}},
    )
Following is my
execute_pipeline
invocation:
execute_pipeline(
	poc,
	run_config={"solids": {"with_run_config_alias": {"config": {"s": "testStr"}}}},
	)
Following is the pipeline:
@pipeline
def poc():
	with_run_config_alias=with_run_config.alias("with_run_config_alias")
	with_run_config_alias()
Following is the solid executed by the pipeline above:
@solid(config_schema={"s":str})
def with_run_config(context, s):
	print("with_run_config s: ", s)
	return to_str(s)
But I am getting this error:
dagster.core.errors.DagsterInvalidConfigError: Error in config for pipeline poc
 Error 1: Missing required config entry "inputs" at path root:solids:with_run_config. Sample config for missing entry: {'inputs': {'s': '<selector>'}}
a

alex

09/16/2021, 7:31 PM
so
s
the input and
s
the config entry are two separate things, if you just want config you do
@solid(config_schema={"s":str})
def with_run_config(context):
    s = context.solid_config['s']
	print("with_run_config s: ", s)
	return to_str(s)
👍 2
y

Yassine Marzougui

09/16/2021, 7:31 PM
Hi Jay -
s
is a config field, so you should get it using
context.solid_config['s']
and remove it from the solid's inputs:
@solid(config_schema={"s":str})
def with_run_config(context):
    s = context.solid_config['s']
    print("with_run_config s: ", s)
    return s
👍 2
j

jay

09/16/2021, 7:34 PM
thanks, that worked.