hey dagster team, how would i go about adding meta...
# ask-community
k
hey dagster team, how would i go about adding metadata to a graph_asset materialization. right now i’m getting errors when i try to return an
Output
from the graph_asset which makes sense given how graphs work. However I don’t see a way in the source code to add materialization metadata to the graph asset itself. the final operation of the graph_asset can do it, but then you get duplicated materializations logged, one with metadata one without from the same run. specifically runtime metadata, not the hardcoded kind via the decorator itself. my usecase is adding a dataframe.head().to_markdown() preview to my graph asset’s materialization
@daniel @sandy any ideas here?
s
the final operation of the graph_asset can do it, but then you get duplicated materializations logged, one with metadata one without from the same run.
do you add it to the
Output
of the final operation? if so, I wouldn't expect two materializations to be logged
k
yeah that’s what i’m doing, i can cook up an example project to see if it’s doing the double materialize there
s
that would be helpful!
k
i wasn’t able to repro, must have been something that i was doing wrong on my side! it works properly in my project now with the most up to date version of dagster. thanks!