sephi
06/03/2020, 6:53 AM@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, dataframethe pipeline runs. Any suggestions?
alex
06/03/2020, 1:37 PM@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
max
06/03/2020, 5:28 PM