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

Colin Mills

06/21/2023, 5:16 PM
Does a Dagster asset have any access to its current status at runtime? By this I mean, if I were materializing an asset, does it have access to the
Latest materialization
via OpExecutionContext or other method? We would like to implement branching logic depending on if this is the first time the asset/asset partition has ever been materializing versus a re-materialization or backfill.
s

sandy

06/21/2023, 8:17 PM
c

Colin Mills

06/21/2023, 8:20 PM
Yep, this was exactly what I was looking for, thanks!
Copy code
@asset
def asset_1(context):
    instance = context.instance
    materialization = instance.get_latest_materialization_event(AssetKey(["asset_1"])).asset_materialization
4 Views