https://dagster.io/ logo
#ask-community
Title
# ask-community
a

Aaron T

06/29/2023, 7:50 PM
Is it possible for a job to materialize an asset? For instance, I want a job to execute (that is not an asset, just does work based on a config) and then save an offset int to be used by the job the next time it runs.
🤖 1
s

sean

06/29/2023, 8:37 PM
Hi Aaron, Any op can
yield AssetMaterialization(...)
. This will generate an
AssetMaterialization
event, and you can put whatever you want in the metadata (like a path to where the offset is stored, or perhaps the value itself). However, you will have to handle the actual persistence of the value yourself (unless you encode it directly in the materialization metadata). But you might not even want to represent this value as an asset-- dagster doesn’t need to know about it, you could just read/write it from some path you either hardcode or pass in via config.