-
Notifications
You must be signed in to change notification settings - Fork 380
Expand file tree
/
Copy pathitems_snapshots.sql
More file actions
48 lines (37 loc) · 870 Bytes
/
items_snapshots.sql
File metadata and controls
48 lines (37 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{% snapshot items_snapshot %}
{{
config(
target_schema='snapshots',
unique_key='id',
strategy='timestamp',
updated_at='ds',
invalidate_hard_deletes=True,
on_schema_change='sync_all_columns',
)
}}
select * from {{ source('streaming', 'items') }}
{% endsnapshot %}
{% snapshot items_check_snapshot %}
{{
config(
target_schema='snapshots',
unique_key='id',
strategy='check',
check_cols=['ds'],
invalidate_hard_deletes=True,
)
}}
select * from {{ source('streaming', 'items') }}
{% endsnapshot %}
{% snapshot items_check_with_cast_snapshot %}
{{
config(
target_schema='snapshots',
unique_key='id',
strategy='check',
check_cols=['ds::DATE'],
invalidate_hard_deletes=True,
)
}}
select * from {{ source('streaming', 'items') }}
{% endsnapshot %}