Skip to main content

invalidate_hard_deletes

snapshots/<filename>.sql
{{
config(
strategy="timestamp",
invalidate_hard_deletes=True
)
}}

dbt_project.yml
snapshots:
<resource-path>:
+strategy: timestamp
+invalidate_hard_deletes: true

Description

Opt-in feature to enable invalidating hard deleted records while snapshotting the query.

Default

By default the feature is disabled.

Example

snapshots/orders.sql
{% snapshot orders_snapshot %}

{{
config(
target_schema='snapshots',
strategy='timestamp',
unique_key='id',
updated_at='updated_at',
invalidate_hard_deletes=True,
)
}}

select * from {{ source('jaffle_shop', 'orders') }}

{% endsnapshot %}
0