Nikolaj Galak
06/06/2023, 10:36 AM@dbt_assets
with AutoMaterializePolicy. Current version supports two types for `dagster_auto_materialize_policy`: lazy
and eager
. For local dev environments we need to materialize only few dbt models via freshness policies. AutoMaterializePolicy.lazy()
defines on_missing=True
which triggers materialization of all models. Is there any way to define custom AutoMaterializePolicy
with new @dbt_assets
? Or extend AutoMaterializePolicy
with "super lazy" type with: on_missing=False,
on_new_parent_data=False,
for_freshness=True,
sandy
06/06/2023, 3:17 PMon_missing
argument to lazy
?owen
06/06/2023, 4:18 PMNikolaj Galak
06/06/2023, 10:12 PMowen
06/07/2023, 11:43 PMNikolaj Galak
06/08/2023, 12:38 AMlatest_root_materialization_time
and daemon_start_time
that can be used for "out of date" calculation. If root is missing, then only logical reference point I can think of is daemon_start_time
. I agree with you that if latest_root_materialization_time
is not null then it is much better reference point compared to infinite or zero. In your example with A and B models, my thinking is: if any of downstream models require fresh data, all upstream models should be materialized, so freshness policy on B should trigger materialization of A, but A should not be materialized just because daemon got started.
I'd gladly create github issue for the idea.