Ben Gatewood
08/08/2022, 11:56 AMpartitions_def
argument to the @asset
decorator. If I want to add metadata to a materialisation, the docs only mention how to do it via an op
based asset or from a custom IO manager. So I could make them an op
in a graph-backed asset maybe? But I can't see any docs on how to partition graph-backed assets? (I know you can actually because I went digging in the source for AssetsDefinition.from_graph()
but it's not at all clear from the docs)Stephen Bailey
08/08/2022, 1:48 PMcontext.add_output_metadata
method, which will log whatever is in the dict to the AssetMaterialization event that running the asset produces. I'm not sure how this plays with partitions yet.@asset
def my_asset(context):
context.add_output_metadata({"how_cool": "so_cool"})
return [1, 2, 3]
claire
08/08/2022, 6:50 PMyield Output(5, metadata={"my_metadata": 5})
Dagster Bot
08/08/2022, 6:51 PMclaire
08/08/2022, 6:59 PMDagster Bot
08/08/2022, 6:59 PMBen Gatewood
08/08/2022, 10:33 PMclaire
08/08/2022, 10:38 PMBen Gatewood
08/08/2022, 10:52 PM