geoHeil
05/28/2022, 3:10 PMowen
05/31/2022, 4:02 PMmetadata
field on the @asset
decorator might be what you're looking for here. under the hood, it attaches this metadata to the corresponding OutputDefinition object, meaning the information is available before the job runs. This metadata will also be represented in Dagit on the definition page (rather than the historical view of materializations)geoHeil
05/31/2022, 4:54 PMowen
05/31/2022, 5:09 PM@asset(metadata={"foo": "bar"})
def my_asset():
...
my_asset.op.outs["result"].metadata == {"foo": "bar"}
what are you using this metadata for at definition time? it's possible there's a way to avoid this sort of messinessgeoHeil
05/31/2022, 5:23 PMowen
05/31/2022, 6:09 PMgeoHeil
06/01/2022, 8:08 AMowen
06/01/2022, 5:39 PM