I am passing a `run_config` in to my pipeline as s...
# ask-community
j
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:
Copy code
execute_pipeline(
        config_example_pipeline,
        run_config={"solids": {"config_example_solid": {"config": {"iterations": 1}}}},
    )
Following is my
execute_pipeline
invocation:
Copy code
execute_pipeline(
	poc,
	run_config={"solids": {"with_run_config_alias": {"config": {"s": "testStr"}}}},
	)
Following is the pipeline:
Copy code
@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:
Copy code
@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:
Copy code
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
so
s
the input and
s
the config entry are two separate things, if you just want config you do
Copy code
@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
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:
Copy code
@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
thanks, that worked.