forked from dbt-checkpoint/dbt-checkpoint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-hooks.yaml
232 lines (232 loc) · 8.91 KB
/
.pre-commit-hooks.yaml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
- id: check-column-desc-are-same
name: Check column descriptions are same
description: Check the models have same descriptions for same column names.
entry: check-column-desc-are-same
language: python
files: '.*\.(yml|yaml)$'
- id: check-macro-has-description
name: Check the macro has description
description: Ensures that the macro has description in properties file.
entry: check-macro-has-description
language: python
types_or: [yaml, sql]
require_serial: true # because we need to process yaml and sql
- id: check-model-columns-have-desc
name: Check the model columns have description
description: Ensures that the model has columns with descriptions in properties file.
entry: check-model-columns-have-desc
language: python
types_or: [yaml, sql]
require_serial: true # because we need to process yaml and sql
- id: check-model-has-all-columns
name: Check the model has all columns in properties file
description: Ensures that all columns in database are specified in properties file.
entry: check-model-has-all-columns
language: python
types: [sql]
- id: check-model-has-description
name: Check the model has description
description: Ensures that the model has description in properties file.
entry: check-model-has-description
language: python
types_or: [yaml, sql]
require_serial: true # because we need to process yaml and sql
- id: check-model-has-meta-keys
name: Check the model has keys in the meta part
description: Ensures that the model has a list of valid meta keys.
entry: check-model-has-meta-keys
language: python
types_or: [yaml, sql]
require_serial: true # because we need to process YAML and SQL
- id: check-model-has-properties-file
name: Check the model has properties file
description: Ensures that the model has properties file (schema file).
entry: check-model-has-properties-file
language: python
types: [sql]
- id: check-model-has-tests-by-group
name: Check the model has a number of tests from a group of tests.
description: Ensures that the model has a number of tests from a group of tests.
entry: check-model-has-tests-by-group
language: python
types: [sql]
- id: check-model-has-tests-by-name
name: Check the model tests by a test name
description: Ensures that the model has a number of tests of a certain name (e.g. data, unique).
entry: check-model-has-tests-by-name
language: python
types: [sql]
- id: check-model-has-tests-by-type
name: Check the model tests by a test type
description: Ensures that the model has a number of tests of a certain type (data, schema).
entry: check-model-has-tests-by-type
language: python
types: [sql]
- id: check-model-has-tests
name: Check the model has a tests
description: Ensures that the model has a number of tests.
entry: check-model-has-tests
language: python
types: [sql]
- id: check-model-parents-and-childs
name: Check the model has a parents/childs
description: Ensures the model has a specific number (max/min) of parents or/and childs.
entry: check-model-parents-and-childs
language: python
types: [sql]
- id: check-model-tags
name: Check the model has valid tags
description: Ensures that the model has only valid tags from the provided list.
entry: check-model-tags
language: python
types: [sql]
- id: check-script-has-no-table-name
name: Check the script has not table name
description: Ensures that the script is using only source or ref macro to specify the table name.
entry: check-script-has-no-table-name
language: python
types: [sql]
- id: check-script-ref-and-source
name: Check the script has existing refs and sources
description: Ensures that the script contains only existing sources or macros.
entry: check-script-ref-and-source
language: python
types: [sql]
- id: check-script-semicolon
name: Check the script does not contain a semicolon
description: Ensure that the script does not have a semicolon at the end of the file.
entry: check-script-semicolon
language: python
types: [sql]
- id: check-source-columns-have-desc
name: Check for source column descriptions
description: Ensures that the source has columns with descriptions in the properties file.
entry: check-source-columns-have-desc
language: python
types_or: [yaml]
- id: check-source-has-all-columns
name: Check the source has all columns in the properties file
description: Ensures that all columns in the database are specified in the properties file.
entry: check-source-has-all-columns
language: python
types_or: [yaml]
- id: check-source-table-has-description
name: Check the source table has description
description: Ensures that the source table has description in properties file.
entry: check-source-table-has-description
language: python
types_or: [yaml]
- id: check-source-has-freshness
name: Check the source has the freshness
description: Ensures that the source has freshness options.
entry: check-source-has-freshness
language: python
types_or: [yaml]
- id: check-source-has-loader
name: Check the source has loader option
description: Ensures that the source has loader option.
entry: check-source-has-loader
language: python
types_or: [yaml]
- id: check-source-has-meta-keys
name: Check the source has keys in the meta part
description: Ensures that the source has a list of valid meta keys.
entry: check-source-has-meta-keys
language: python
types_or: [yaml]
- id: check-source-has-tests-by-name
name: Check the source tests by test name
description: Ensures that the source has a number of tests of a certain name (e.g. data, unique).
entry: check-source-has-tests-by-name
language: python
types_or: [yaml]
- id: check-source-has-tests-by-type
name: Check the source tests by test type
description: Ensures that the source has a number of tests of a certain type (data, schema).
entry: check-source-has-tests-by-type
language: python
types_or: [yaml]
- id: check-source-has-tests
name: Check the source has tests
description: Ensures that the source has a number of tests.
entry: check-source-has-tests
language: python
types_or: [yaml]
- id: check-source-tags
name: Check the source has valid tags
description: Ensures that the source has only valid tags from the provided list.
entry: check-source-tags
language: python
types_or: [yaml]
- id: dbt-clean
name: dbt clean
description: Deletes all folders specified in the clean-targets.
entry: dbt-clean
language: python
pass_filenames: false
- id: dbt-compile
name: dbt compile
description: Generates executable SQL from source model, test, and analysis files.
entry: dbt-compile
language: python
types: [sql]
require_serial: true
- id: dbt-deps
name: dbt deps
description: Pulls the most recent version of the dependencies listed in your packages.yml.
entry: dbt-deps
language: python
pass_filenames: false
- id: dbt-docs-generate
name: dbt docs generate
description: The command is responsible for generating your project's documentation website.
entry: dbt-docs-generate
language: python
pass_filenames: false
- id: dbt-run
name: dbt run
description: Executes compiled sql model files.
entry: dbt-run
language: python
require_serial: true
types: [sql]
- id: dbt-test
name: dbt test
description: Runs tests on data in deployed models.
entry: dbt-test
language: python
require_serial: true
types: [sql]
- id: generate-missing-sources
name: Generate missing sources
description: If any source is missing this hook tries to create it.
entry: generate-missing-sources
language: python
types: [sql]
- id: generate-model-properties-file
name: Generate model properties file
description: Generate model properties file if does not exists.
entry: generate-model-properties-file
language: python
types: [sql]
args: ["--properties-file", "/Users/tomsejr/Documents/03-Workspace/Private/jaffle_shop/{database}/{schema}/{name}.yml"]
require_serial: true
- id: unify-column-description
name: Unify column description
description: Unify column descriptions across all models
entry: unify-column-description
language: python
files: '.*\.(yml|yaml)$'
require_serial: true
- id: replace-script-table-names
name: Replace script table names
description: Replace table names with source or ref macros in the script.
entry: replace-script-table-names
language: python
types: [sql]
- id: remove-script-semicolon
name: Remove script semicolon
description: Remove semicolon at the end of the script.
entry: remove-script-semicolon
language: python
types: [sql]