Nick Dagostino
06/22/2023, 4:50 PM@multi_asset
output. Function generates four dataframes returned as assets. I am trying to add a preview of the dfs to the output via context.add_output_metadata({'preview': MetadataValue.md(<http://df.to|df.to>_markdown())}
, however, because the function returns four dataframes, the .add_output_metadata()
will not work. Here is the error I receive: `DagsterInvariantViolationError: Attempted to log metadata without providing output_name, but multiple outputs exist. Please provide an output_name to the invocation of context.add_output_metadata
.`yuhan
06/22/2023, 4:56 PMadd_output_metadata
is associated with a single output, so you’d need to specify an output that you want the metadata to attach to:
context.add_output_metadata({'preview': MetadataValue.md())}, output_name="...")
Nick Dagostino
06/22/2023, 5:00 PMadd_output_metadata
could take output_name
as an arg. Feel kinda dumb now, lol. This works so thank you.