Hi, When running a composite_solid we need to outp...
# announcements
s
Hi, When running a composite_solid we need to output 2 objects. if we run with
@composite_solid(
output_defs=[OutputDefinition(name='path', dagster_type=String),
OutputDefinition(name='dataframe', dagster_type=DataFrame),
])
def my_solid():
...
path = solid_return_path()
dataframe = solid_return_dataframe()
yield Output (path, 'path')
yield Output (dataframe, 'dataframe')
we get the following error:
dagster.core.errors.DagsterInvalidDefinitionError: @composite_solid my_solid returned problematic value of type <class 'generator'>. Expected return value from invoked solid or dict mapping output name to return values from invoked solids.
If we change it to :
return path, dataframe
the pipeline runs. Any suggestions?
a
@composite_solid
is not actually invoked at run time - like
@pipeline
its purpose is to just create a DAG structure which we do by evaluating the function at init time.
return path, dataframe
will do what you want I believe. It will map based on order to the
output_defs
m
this is a bad error message