Hi all, What is the best way to set a variable tha...
# ask-community
c
Hi all, What is the best way to set a variable that gets updated each run (example: last run date offset)
t
Based on how it's used, you can set it in the metadata on each materialization and grab the most recent materialization's value. Below is a snippet on how to do it:
Copy code
context.instance.get_latest_materialization_event(AssetKey(["asset_a"])).dagster_event.event_specific_data.materialization.metadata
c
Wont this get overwritten in a backfill and screw up future runs?