Hi, I'm wondering how to stub an input to the firs...
# announcements
w
Hi, I'm wondering how to stub an input to the first solid in my pipeline. The docs say this is possible here but I can't figure out how. I tried passing a dummy instance of the input type (a custom
DagsterType
) in the pipeline definition, but got a
DagsterInvalidDefinitionError
saying
Must pass the output from previous solid invocations or inputs to the composition function as inputs when invoking solids during composition.
What is the composition function in this context?
m
hi wes! inputs can be stubbed using the config system
the docs you linked to should have some examples of doing this on the CLI, in the Python API, and in Dagit
but basically, if you have a config fragment like
{'solids': {'my_solid': {'inputs': {'input_name': {'value': 'some_stub_value'}}}}}
that should work
for custom types, you can define your own input hydration to convert from config to an in-memory value
w
Oh ok... thanks! didn't see this
m
np! it'd be helpful to know what you looked for / how you searched
so we can surface this stuff better
w
I think it might help just to link to the "Providing Input Values for Custom Types in Config" section from the bit about stubbing inputs?
under "Specifying Config for Pipeline Execution"
imo the docs make it very clear that solid inputs can be supplied by the outputs of other solids, configured at pipeline invocation time from the Python API, Dagit, CLI, etc, but I was a bit confused by the error message
I searched for "composition function"
1
the input hydration function for custom input types was the missing piece for me. I saw the "Making Your Pipelines Testable and Maintainable" header and assumed it wasn't the right place to look for more info about configuring solid inputs
thanks again
is there any way to use nested custom types in an input hydration function?