jay
09/16/2021, 7:12 PMrun_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>'}}
alex
09/16/2021, 7:31 PMs
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)
Yassine Marzougui
09/16/2021, 7:31 PMs
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
jay
09/16/2021, 7:34 PM