Skip to content

Commit 1eabf3a

Browse files
authored
Merge pull request #537 from dbt-labs/move_freshness_under_config
2 parents 94768b1 + 78d73ea commit 1eabf3a

File tree

29 files changed

+275
-169
lines changed

29 files changed

+275
-169
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
SNOWFLAKE_ROLE: ${{ vars.SNOWFLAKE_ROLE }}
3737
SNOWFLAKE_DATABASE: ${{ vars.SNOWFLAKE_DATABASE }}
3838
SNOWFLAKE_WAREHOUSE: ${{ vars.SNOWFLAKE_WAREHOUSE }}
39-
SNOWFLAKE_SCHEMA: "dbt_utils_integration_tests_snowflake_${{ github.run_number }}"
39+
SNOWFLAKE_SCHEMA: "dbt_project_evaluator_integration_tests_snowflake_${{ github.run_number }}"
4040
# databricks
4141
DATABRICKS_SCHEMA: "integration_tests_databricks_${{ github.run_number }}"
4242
DATABRICKS_HOST: ${{ vars.DATABRICKS_HOST }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ integration_tests/package-lock.yml
2727

2828
# duckdb
2929
*.db
30-
*.duckdb
30+
*.duckdb
31+
dbt_internal_packages/

dbt_project.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: 'dbt_project_evaluator'
22
version: '1.0.0'
33
config-version: 2
44

5-
require-dbt-version: [">=1.8.0", "<2.0.0"]
5+
require-dbt-version: [">=1.10.6", "<3.0.0"]
66

77
model-paths: ["models"]
88
analysis-paths: ["analysis"]
@@ -16,6 +16,9 @@ clean-targets: # directories to be removed by `dbt clean`
1616
- "target"
1717
- "dbt_packages"
1818

19+
flags:
20+
require_nested_cumulative_type_params: True
21+
require_yaml_configuration_for_mf_time_spines: True
1922

2023
dispatch:
2124
- macro_namespace: dbt

integration_tests/dbt_project.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,18 @@ dispatch:
2828
- macro_namespace: dbt
2929
search_order: ['dbt_project_evaluator', 'dbt']
3030

31+
flags:
32+
require_nested_cumulative_type_params: True
33+
require_yaml_configuration_for_mf_time_spines: True
34+
require_generic_test_arguments_property: True
35+
3136
models:
3237
dbt_project_evaluator_integration_tests:
3338
# materialize as ephemeral to prevent the fake models from executing, but keep them enabled
3439
+materialized: ephemeral
3540
dbt_project_evaluator:
3641
marts:
37-
data_tests:
42+
tests:
3843
fct_test_coverage:
3944
# materialize as a table to ensure SQL query runs successfully
4045
+materialized: table

integration_tests/exclude_package/models/staging/_models.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
models:
22
- name: excluded_model
3-
access: public
43
config:
4+
access: public
55
contract:
66
enforced: true
77
columns:

integration_tests/models/marts/exposures.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ exposures:
66
type: dashboard
77
url: dave.com/metrics
88
maturity: low
9-
tags: ['proserv']
109
owner:
1110
name: dave's davey
1211
12+
config:
13+
tags: ['proserv']
1314

1415
depends_on:
1516
- ref('fct_model_6')

integration_tests/models/marts/metrics.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ metrics:
4343
type_params:
4444
# Specify the measure you are creating a proxy for.
4545
measure: total_count
46-
window: 30 days
46+
cumulative_type_params:
47+
window: 30 days
4748
filter: |
4849
{{ Dimension('dim__id') }} > 0

integration_tests/models/reports/reports.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
version: 2
22

3+
groups:
4+
- name: my_awesome_group
5+
owner:
6+
7+
38
models:
49
- name: report_1
510
description: tom cruise's minority report
6-
access: public
711
config:
12+
access: public
813
materialized: table
914
columns:
1015
- name: col
@@ -13,9 +18,10 @@ models:
1318

1419
- name: report_2
1520
description: the colbert report
16-
access: public
1721
config:
22+
access: public
1823
materialized: table
24+
group: my_awesome_group
1925
contract:
2026
enforced: true
2127
columns:

integration_tests/models/staging/source_1/schema.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ models:
1313
- name: stg_model_3
1414
data_tests:
1515
- dbt_utils.unique_combination_of_columns:
16-
combination_of_columns:
17-
- id
18-
- color
16+
arguments:
17+
combination_of_columns:
18+
- id
19+
- color
1920
- name: stg_model_2
2021
columns:
2122
- name: id

integration_tests/models/staging/source_1/source.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ sources:
44
- name: source_1
55
description: this is source 1.
66
schema: real_schema
7-
freshness: # default freshness
8-
warn_after: {count: 12, period: hour}
7+
config:
8+
freshness: # default freshness
9+
warn_after: {count: 12, period: hour}
910
# database: real_database
1011
tables:
1112
- name: table_1
@@ -16,7 +17,8 @@ sources:
1617
- name: table_2
1718
- name: table_4
1819
- name: table_5
19-
freshness: null
20+
config:
21+
freshness: null
2022
- name: raw_table_5
2123
identifier: table_5
2224

0 commit comments

Comments
 (0)