Skip to content

Commit

Permalink
prune incremental config & misc
Browse files Browse the repository at this point in the history
- list and folders don't need this
- seed dates & src tasks raw dont need full refresh
  • Loading branch information
luutuankiet committed Nov 23, 2024
1 parent 3a16641 commit a49c466
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions dbt_project/dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ seeds:
+column_types:
goal_ids: "text"
date_seed:
full_refresh: false

vars:
"dbt_date:time_zone": "Asia/Ho_Chi_Minh"
5 changes: 2 additions & 3 deletions dbt_project/models/raw_source/src__folders_raw.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{{ config(
materialized = 'incremental',
unique_key = 'folder_id'
materialized = 'table'
) }}
WITH source AS (
SELECT
Expand Down Expand Up @@ -36,4 +35,4 @@ renamed AS (
SELECT
*
FROM
renamed
renamed
3 changes: 3 additions & 0 deletions dbt_project/models/raw_source/src__folders_raw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ models:
columns:
- name: folder_id
description: ""
data_tests:
- unique
- not_null
meta:
dimension:
type: string
Expand Down
3 changes: 1 addition & 2 deletions dbt_project/models/raw_source/src__lists_raw.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{{ config(
materialized = 'incremental',
unique_key = 'list_id'
materialized = 'table'
) }}

WITH source AS (
Expand Down
3 changes: 3 additions & 0 deletions dbt_project/models/raw_source/src__lists_raw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ models:
columns:
- name: list_id
description: ""
data_tests:
- unique
- not_null
meta:
dimension:
type: string
Expand Down
3 changes: 2 additions & 1 deletion dbt_project/models/raw_source/src__tasks_raw.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{{ config(
materialized = 'incremental',
unique_key = ['todo_id'],
on_schema_change='append_new_columns'
on_schema_change='append_new_columns',
full_refresh = false
) }}

{% set datetime_list = ['todo_createdtime', 'todo_completedtime', 'todo_startdate', 'todo_duedate', 'todo_modifiedtime'] %}
Expand Down

0 comments on commit a49c466

Please sign in to comment.