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

Christian Ritter

06/12/2023, 3:05 PM
Hi, I am trying to setup assets with data versions and automaterialization, but it does not work as I would expect. I would assume that - when the dataversion for my upstream asset is unchanged - the downstream asset will not be triggered by auto-materialization. However, when I re-materialize my upstream asset, the downstream asset is also updated. Example:
Copy code
@asset
def foo():
    return Output(1, data_version=DataVersion("123"))


@asset(auto_materialize_policy=AutoMaterializePolicy.eager())
def bar(foo):
    return simple_in + 2
When materializing
foo
the second time,
bar
will also materialize. Any idea what I am doing wrong, or did I just misunderstand the feature? Thanks in advance Christian
o

owen

06/12/2023, 6:34 PM
hi @Christian Ritter! You're not exactly doing anything wrong, but currently the auto materialize logic does not take data versions into account (it's just based on materialization timestamps). However, it is intended for this to be factored in in the future (in fact, data versions of observable source assets are already accounted for), there are just some technical details to work out first to ensure that this is performant for partitioned assets.
c

Christian Ritter

06/13/2023, 6:33 AM
Hey @owen, thanks for the quick reply 🙂 I'll keep a look on the upcoming change notes then
2 Views