Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions dbt_adbs_test_project/models/filter_table.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
select id,
label,
created_at
from {{ ref ('label_data') }}
where id != 2
7 changes: 7 additions & 0 deletions dbt_adbs_test_project/models/label_data.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{ config(materialized='table') }}

SELECT
id,
label,
current_timestamp AS created_at
FROM {{ ref('label_table') }}
3 changes: 3 additions & 0 deletions dbt_adbs_test_project/seeds/label_table.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
id,label
1,first
2,second
15 changes: 15 additions & 0 deletions dbt_adbs_test_project/snapshots/label_data_snapshot.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{% snapshot snapshot_label_table %}

{{
config(
strategy = 'timestamp'
, unique_key = 'id'
, updated_at = 'created_at'
, hard_deletes = 'new_record'
)
}}

SELECT * FROM {{ ref ('label_data') }}

{% endsnapshot %}