Skip to content

Commit 78d73ea

Browse files
committed
Update more code following new deprecations
1 parent f524b31 commit 78d73ea

File tree

18 files changed

+214
-145
lines changed

18 files changed

+214
-145
lines changed

.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: 1 addition & 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.9.0", "<3.0.0"]
5+
require-dbt-version: [">=1.10.6", "<3.0.0"]
66

77
model-paths: ["models"]
88
analysis-paths: ["analysis"]

integration_tests/dbt_project.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ dispatch:
3131
flags:
3232
require_nested_cumulative_type_params: True
3333
require_yaml_configuration_for_mf_time_spines: True
34+
require_generic_test_arguments_property: True
3435

3536
models:
3637
dbt_project_evaluator_integration_tests:

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/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/staging.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ models:
88
- unique
99
- not_null
1010
- relationships:
11-
to: ref('stg_model_2')
12-
field: id
11+
arguments:
12+
to: ref('stg_model_2')
13+
field: id
1314
- name: "concat(coalesce('fake_column', ' '),'for_testing')"
1415
data_tests:
1516
- not_null

integration_tests/seeds/dag/dag_seeds.yml

Lines changed: 79 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -4,100 +4,122 @@ seeds:
44
- name: test_fct_multiple_sources_joined
55
data_tests:
66
- dbt_utils.equality:
7-
name: equality_fct_multiple_sources_joined
8-
compare_model: ref('fct_multiple_sources_joined')
9-
compare_columns:
10-
- child
11-
- "{{ 'source_parents' if target.type != 'databricks' else 'child' }}"
7+
config:
8+
name: equality_fct_multiple_sources_joined
9+
arguments:
10+
compare_model: ref('fct_multiple_sources_joined')
11+
compare_columns:
12+
- child
13+
- "{{ 'source_parents' if target.type != 'databricks' else 'child' }}"
1214

1315
- name: test_fct_direct_join_to_source
1416
data_tests:
1517
- dbt_utils.equality:
16-
name: equality_fct_direct_join_to_source
17-
compare_model: ref('fct_direct_join_to_source')
18-
compare_columns:
19-
- parent
20-
- parent_resource_type
21-
- child
22-
- child_resource_type
23-
- distance
18+
config:
19+
name: equality_fct_direct_join_to_source
20+
arguments:
21+
compare_model: ref('fct_direct_join_to_source')
22+
compare_columns:
23+
- parent
24+
- parent_resource_type
25+
- child
26+
- child_resource_type
27+
- distance
2428

2529
- name: test_fct_duplicate_sources
2630
data_tests:
2731
- dbt_utils.equality:
28-
name: equality_fct_duplicate_sources
29-
compare_model: ref('fct_duplicate_sources')
30-
compare_columns:
31-
- source_names
32+
config:
33+
name: equality_fct_duplicate_sources
34+
arguments:
35+
compare_model: ref('fct_duplicate_sources')
36+
compare_columns:
37+
- source_names
3238

3339
- name: test_fct_root_models
3440
data_tests:
3541
- dbt_utils.equality:
36-
name: equality_fct_root_models
37-
compare_model: ref('fct_root_models')
42+
config:
43+
name: equality_fct_root_models
44+
arguments:
45+
compare_model: ref('fct_root_models')
3846

3947
- name: test_fct_unused_sources
4048
data_tests:
4149
- dbt_utils.equality:
42-
name: equality_fct_unused_sources
43-
compare_model: ref('fct_unused_sources')
50+
config:
51+
name: equality_fct_unused_sources
52+
arguments:
53+
compare_model: ref('fct_unused_sources')
4454

4555
- name: test_fct_source_fanout
4656
data_tests:
4757
- dbt_utils.equality:
48-
name: equality_fct_source_fanout
49-
compare_model: ref('fct_source_fanout')
50-
compare_columns:
51-
- parent
52-
- "{{ 'model_children' if target.type != 'databricks' else 'parent' }}"
58+
config:
59+
name: equality_fct_source_fanout
60+
arguments:
61+
compare_model: ref('fct_source_fanout')
62+
compare_columns:
63+
- parent
64+
- "{{ 'model_children' if target.type != 'databricks' else 'parent' }}"
5365

5466
- name: test_fct_model_fanout
5567
data_tests:
5668
- dbt_utils.equality:
57-
name: equality_fct_model_fanout
58-
compare_model: ref('fct_model_fanout')
59-
compare_columns:
60-
- parent
61-
- parent_model_type
62-
- "{{ 'leaf_children' if target.type != 'databricks' else 'parent_model_type' }}"
69+
config:
70+
name: equality_fct_model_fanout
71+
arguments:
72+
compare_model: ref('fct_model_fanout')
73+
compare_columns:
74+
- parent
75+
- parent_model_type
76+
- "{{ 'leaf_children' if target.type != 'databricks' else 'parent_model_type' }}"
6377

6478
- name: test_fct_staging_dependent_on_staging
6579
data_tests:
6680
- dbt_utils.equality:
67-
name: equality_fct_staging_dependent_on_staging
68-
compare_model: ref('fct_staging_dependent_on_staging')
69-
compare_columns:
70-
- parent
71-
- parent_model_type
72-
- child
73-
- child_model_type
81+
config:
82+
name: equality_fct_staging_dependent_on_staging
83+
arguments:
84+
compare_model: ref('fct_staging_dependent_on_staging')
85+
compare_columns:
86+
- parent
87+
- parent_model_type
88+
- child
89+
- child_model_type
7490

7591
- name: test_fct_rejoining_of_upstream_concepts
7692
data_tests:
7793
- dbt_utils.equality:
78-
name: equality_fct_rejoining_of_upstream_concepts
79-
compare_model: ref('fct_rejoining_of_upstream_concepts')
80-
compare_columns:
81-
- parent
82-
- child
83-
- parent_and_child
84-
- is_loop_independent
94+
config:
95+
name: equality_fct_rejoining_of_upstream_concepts
96+
arguments:
97+
compare_model: ref('fct_rejoining_of_upstream_concepts')
98+
compare_columns:
99+
- parent
100+
- child
101+
- parent_and_child
102+
- is_loop_independent
85103

86104
- name: test_fct_hard_coded_references
87105
data_tests:
88106
- dbt_utils.equality:
89-
name: equality_fct_hard_coded_references
90-
compare_model: ref('fct_hard_coded_references')
91-
compare_columns:
92-
- model
93-
- hard_coded_references
107+
config:
108+
name: equality_fct_hard_coded_references
109+
arguments:
110+
compare_model: ref('fct_hard_coded_references')
111+
compare_columns:
112+
- model
113+
- hard_coded_references
94114

95115
- name: test_fct_too_many_joins
96116
data_tests:
97117
- dbt_utils.equality:
98-
name: equality_fct_too_many_joins
99-
compare_model: ref('fct_too_many_joins')
100-
compare_columns:
101-
- resource_name
102-
- file_path
103-
- join_count
118+
config:
119+
name: equality_fct_too_many_joins
120+
arguments:
121+
compare_model: ref('fct_too_many_joins')
122+
compare_columns:
123+
- resource_name
124+
- file_path
125+
- join_count

integration_tests/seeds/docs/docs_seeds.yml

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ seeds:
77
- docs
88
data_tests:
99
- dbt_utils.equality:
10-
name: equality_fct_undocumented_models
11-
compare_model: ref('fct_undocumented_models')
10+
config:
11+
name: equality_fct_undocumented_models
12+
arguments:
13+
compare_model: ref('fct_undocumented_models')
1214

1315
- name: test_fct_documentation_coverage
1416
config:
@@ -21,31 +23,37 @@ seeds:
2123
- docs
2224
data_tests:
2325
- dbt_utils.equality:
24-
name: equality_fct_documentation_coverage
25-
compare_model: ref('fct_documentation_coverage')
26-
compare_columns:
27-
- total_models
28-
- documented_models
29-
- documentation_coverage_pct
30-
- staging_documentation_coverage_pct
31-
- intermediate_documentation_coverage_pct
32-
- marts_documentation_coverage_pct
33-
- other_documentation_coverage_pct
26+
config:
27+
name: equality_fct_documentation_coverage
28+
arguments:
29+
compare_model: ref('fct_documentation_coverage')
30+
compare_columns:
31+
- total_models
32+
- documented_models
33+
- documentation_coverage_pct
34+
- staging_documentation_coverage_pct
35+
- intermediate_documentation_coverage_pct
36+
- marts_documentation_coverage_pct
37+
- other_documentation_coverage_pct
3438

3539
- name: test_fct_undocumented_source_tables
3640
config:
3741
tags:
3842
- docs
3943
data_tests:
4044
- dbt_utils.equality:
41-
name: equality_fct_undocumented_source_tables
42-
compare_model: ref('fct_undocumented_source_tables')
45+
config:
46+
name: equality_fct_undocumented_source_tables
47+
arguments:
48+
compare_model: ref('fct_undocumented_source_tables')
4349

4450
- name: test_fct_undocumented_sources
4551
config:
4652
tags:
4753
- docs
4854
data_tests:
4955
- dbt_utils.equality:
50-
name: equality_fct_undocumented_sources
51-
compare_model: ref('fct_undocumented_sources')
56+
config:
57+
name: equality_fct_undocumented_sources
58+
arguments:
59+
compare_model: ref('fct_undocumented_sources')

0 commit comments

Comments
 (0)