I'm trying to use the solid factory pattern, what ...
# announcements
f
I'm trying to use the solid factory pattern, what is the best way to access the inputs in the solid business logic? Can the inputs be read from the
context
or do I need to use
*args
or
**kwargs
?
Looking at the API docs it seems that a dictionary is passed to the function? https://docs.dagster.io/docs/apidocs/solids#dagster.SolidDefinition
I think I found out the hard way:
Copy code
dagster.core.errors.DagsterInvalidDefinitionError: @solid 'console_out' decorated function has parameter 'inputs' that is not one of the solid input_defs. Solid functions should only have keyword arguments that match input names and a first positional parameter named 'context'.
a
if youre doing dynamic inputs,
**kwargs
is the way to go
👍 1
f
That's what I ended up doing, I'm really loving the error messages from dagster, they very helpful