collate-dbt-artifacts-parser 0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. collate_dbt_artifacts_parser/__init__.py +21 -0
  2. collate_dbt_artifacts_parser/parser.py +390 -0
  3. collate_dbt_artifacts_parser/parsers/__init__.py +16 -0
  4. collate_dbt_artifacts_parser/parsers/base.py +26 -0
  5. collate_dbt_artifacts_parser/parsers/catalog/__init__.py +16 -0
  6. collate_dbt_artifacts_parser/parsers/catalog/catalog_cloud.py +85 -0
  7. collate_dbt_artifacts_parser/parsers/catalog/catalog_v1.py +85 -0
  8. collate_dbt_artifacts_parser/parsers/manifest/__init__.py +16 -0
  9. collate_dbt_artifacts_parser/parsers/manifest/manifest_cloud.py +4172 -0
  10. collate_dbt_artifacts_parser/parsers/manifest/manifest_v1.py +1548 -0
  11. collate_dbt_artifacts_parser/parsers/manifest/manifest_v10.py +1667 -0
  12. collate_dbt_artifacts_parser/parsers/manifest/manifest_v11.py +1449 -0
  13. collate_dbt_artifacts_parser/parsers/manifest/manifest_v12.py +4182 -0
  14. collate_dbt_artifacts_parser/parsers/manifest/manifest_v2.py +1553 -0
  15. collate_dbt_artifacts_parser/parsers/manifest/manifest_v3.py +1565 -0
  16. collate_dbt_artifacts_parser/parsers/manifest/manifest_v4.py +1748 -0
  17. collate_dbt_artifacts_parser/parsers/manifest/manifest_v5.py +1763 -0
  18. collate_dbt_artifacts_parser/parsers/manifest/manifest_v6.py +1799 -0
  19. collate_dbt_artifacts_parser/parsers/manifest/manifest_v7.py +1917 -0
  20. collate_dbt_artifacts_parser/parsers/manifest/manifest_v8.py +1258 -0
  21. collate_dbt_artifacts_parser/parsers/manifest/manifest_v9.py +1431 -0
  22. collate_dbt_artifacts_parser/parsers/run_results/__init__.py +16 -0
  23. collate_dbt_artifacts_parser/parsers/run_results/run_results_cloud.py +90 -0
  24. collate_dbt_artifacts_parser/parsers/run_results/run_results_v1.py +75 -0
  25. collate_dbt_artifacts_parser/parsers/run_results/run_results_v2.py +76 -0
  26. collate_dbt_artifacts_parser/parsers/run_results/run_results_v3.py +147 -0
  27. collate_dbt_artifacts_parser/parsers/run_results/run_results_v4.py +147 -0
  28. collate_dbt_artifacts_parser/parsers/run_results/run_results_v5.py +79 -0
  29. collate_dbt_artifacts_parser/parsers/run_results/run_results_v6.py +89 -0
  30. collate_dbt_artifacts_parser/parsers/sources/__init__.py +16 -0
  31. collate_dbt_artifacts_parser/parsers/sources/sources_cloud.py +107 -0
  32. collate_dbt_artifacts_parser/parsers/sources/sources_v1.py +88 -0
  33. collate_dbt_artifacts_parser/parsers/sources/sources_v2.py +100 -0
  34. collate_dbt_artifacts_parser/parsers/sources/sources_v3.py +107 -0
  35. collate_dbt_artifacts_parser/parsers/utils.py +67 -0
  36. collate_dbt_artifacts_parser/parsers/version_map.py +124 -0
  37. collate_dbt_artifacts_parser/resources/catalog/catalog_cloud.json +425 -0
  38. collate_dbt_artifacts_parser/resources/catalog/catalog_v1.json +425 -0
  39. collate_dbt_artifacts_parser/resources/manifest/manifest_cloud.json +22719 -0
  40. collate_dbt_artifacts_parser/resources/manifest/manifest_v1.json +5074 -0
  41. collate_dbt_artifacts_parser/resources/manifest/manifest_v10.json +5638 -0
  42. collate_dbt_artifacts_parser/resources/manifest/manifest_v11.json +6256 -0
  43. collate_dbt_artifacts_parser/resources/manifest/manifest_v12.json +22727 -0
  44. collate_dbt_artifacts_parser/resources/manifest/manifest_v2.json +5128 -0
  45. collate_dbt_artifacts_parser/resources/manifest/manifest_v3.json +5225 -0
  46. collate_dbt_artifacts_parser/resources/manifest/manifest_v4.json +5939 -0
  47. collate_dbt_artifacts_parser/resources/manifest/manifest_v5.json +5984 -0
  48. collate_dbt_artifacts_parser/resources/manifest/manifest_v6.json +6209 -0
  49. collate_dbt_artifacts_parser/resources/manifest/manifest_v7.json +6575 -0
  50. collate_dbt_artifacts_parser/resources/manifest/manifest_v8.json +4434 -0
  51. collate_dbt_artifacts_parser/resources/manifest/manifest_v9.json +4965 -0
  52. collate_dbt_artifacts_parser/resources/run-results/run-results_cloud.json +265 -0
  53. collate_dbt_artifacts_parser/resources/run-results/run-results_v1.json +183 -0
  54. collate_dbt_artifacts_parser/resources/run-results/run-results_v2.json +190 -0
  55. collate_dbt_artifacts_parser/resources/run-results/run-results_v3.json +381 -0
  56. collate_dbt_artifacts_parser/resources/run-results/run-results_v4.json +400 -0
  57. collate_dbt_artifacts_parser/resources/run-results/run-results_v5.json +229 -0
  58. collate_dbt_artifacts_parser/resources/run-results/run-results_v6.json +264 -0
  59. collate_dbt_artifacts_parser/resources/sources/sources_cloud.json +280 -0
  60. collate_dbt_artifacts_parser/resources/sources/sources_v1.json +212 -0
  61. collate_dbt_artifacts_parser/resources/sources/sources_v2.json +261 -0
  62. collate_dbt_artifacts_parser/resources/sources/sources_v3.json +280 -0
  63. collate_dbt_artifacts_parser/utils.py +27 -0
  64. collate_dbt_artifacts_parser-0.1.dist-info/METADATA +531 -0
  65. collate_dbt_artifacts_parser-0.1.dist-info/RECORD +67 -0
  66. collate_dbt_artifacts_parser-0.1.dist-info/WHEEL +4 -0
  67. collate_dbt_artifacts_parser-0.1.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,280 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "title": "FreshnessExecutionResultArtifact",
5
+ "properties": {
6
+ "metadata": {
7
+ "type": "object",
8
+ "title": "FreshnessMetadata",
9
+ "properties": {
10
+ "dbt_schema_version": {
11
+ "type": "string"
12
+ },
13
+ "dbt_version": {
14
+ "type": "string",
15
+ "default": "1.9.0b2"
16
+ },
17
+ "generated_at": {
18
+ "type": "string"
19
+ },
20
+ "invocation_id": {
21
+ "anyOf": [
22
+ {
23
+ "type": "string"
24
+ },
25
+ {
26
+ "type": "null"
27
+ }
28
+ ]
29
+ },
30
+ "env": {
31
+ "type": "object",
32
+ "additionalProperties": {
33
+ "type": "string"
34
+ },
35
+ "propertyNames": {
36
+ "type": "string"
37
+ }
38
+ }
39
+ },
40
+ "additionalProperties": false
41
+ },
42
+ "results": {
43
+ "type": "array",
44
+ "items": {
45
+ "anyOf": [
46
+ {
47
+ "type": "object",
48
+ "title": "SourceFreshnessRuntimeError",
49
+ "properties": {
50
+ "unique_id": {
51
+ "type": "string"
52
+ },
53
+ "error": {
54
+ "anyOf": [
55
+ {
56
+ "type": "string"
57
+ },
58
+ {
59
+ "type": "integer"
60
+ },
61
+ {
62
+ "type": "null"
63
+ }
64
+ ]
65
+ },
66
+ "status": {
67
+ "enum": [
68
+ "runtime error"
69
+ ]
70
+ }
71
+ },
72
+ "additionalProperties": false,
73
+ "required": [
74
+ "unique_id",
75
+ "error",
76
+ "status"
77
+ ]
78
+ },
79
+ {
80
+ "type": "object",
81
+ "title": "SourceFreshnessOutput",
82
+ "properties": {
83
+ "unique_id": {
84
+ "type": "string"
85
+ },
86
+ "max_loaded_at": {
87
+ "type": "string"
88
+ },
89
+ "snapshotted_at": {
90
+ "type": "string"
91
+ },
92
+ "max_loaded_at_time_ago_in_s": {
93
+ "type": "number"
94
+ },
95
+ "status": {
96
+ "enum": [
97
+ "pass",
98
+ "warn",
99
+ "error",
100
+ "runtime error"
101
+ ]
102
+ },
103
+ "criteria": {
104
+ "type": "object",
105
+ "title": "FreshnessThreshold",
106
+ "properties": {
107
+ "warn_after": {
108
+ "anyOf": [
109
+ {
110
+ "type": "object",
111
+ "title": "Time",
112
+ "properties": {
113
+ "count": {
114
+ "anyOf": [
115
+ {
116
+ "type": "integer"
117
+ },
118
+ {
119
+ "type": "null"
120
+ }
121
+ ],
122
+ "default": null
123
+ },
124
+ "period": {
125
+ "anyOf": [
126
+ {
127
+ "enum": [
128
+ "minute",
129
+ "hour",
130
+ "day"
131
+ ]
132
+ },
133
+ {
134
+ "type": "null"
135
+ }
136
+ ],
137
+ "default": null
138
+ }
139
+ },
140
+ "additionalProperties": false
141
+ },
142
+ {
143
+ "type": "null"
144
+ }
145
+ ]
146
+ },
147
+ "error_after": {
148
+ "anyOf": [
149
+ {
150
+ "type": "object",
151
+ "title": "Time",
152
+ "properties": {
153
+ "count": {
154
+ "anyOf": [
155
+ {
156
+ "type": "integer"
157
+ },
158
+ {
159
+ "type": "null"
160
+ }
161
+ ],
162
+ "default": null
163
+ },
164
+ "period": {
165
+ "anyOf": [
166
+ {
167
+ "enum": [
168
+ "minute",
169
+ "hour",
170
+ "day"
171
+ ]
172
+ },
173
+ {
174
+ "type": "null"
175
+ }
176
+ ],
177
+ "default": null
178
+ }
179
+ },
180
+ "additionalProperties": false
181
+ },
182
+ {
183
+ "type": "null"
184
+ }
185
+ ]
186
+ },
187
+ "filter": {
188
+ "anyOf": [
189
+ {
190
+ "type": "string"
191
+ },
192
+ {
193
+ "type": "null"
194
+ }
195
+ ],
196
+ "default": null
197
+ }
198
+ },
199
+ "additionalProperties": false
200
+ },
201
+ "adapter_response": {
202
+ "type": "object",
203
+ "propertyNames": {
204
+ "type": "string"
205
+ }
206
+ },
207
+ "timing": {
208
+ "type": "array",
209
+ "items": {
210
+ "type": "object",
211
+ "title": "TimingInfo",
212
+ "properties": {
213
+ "name": {
214
+ "type": "string"
215
+ },
216
+ "started_at": {
217
+ "anyOf": [
218
+ {
219
+ "type": "string"
220
+ },
221
+ {
222
+ "type": "null"
223
+ }
224
+ ],
225
+ "default": null
226
+ },
227
+ "completed_at": {
228
+ "anyOf": [
229
+ {
230
+ "type": "string"
231
+ },
232
+ {
233
+ "type": "null"
234
+ }
235
+ ],
236
+ "default": null
237
+ }
238
+ },
239
+ "additionalProperties": false,
240
+ "required": [
241
+ "name"
242
+ ]
243
+ }
244
+ },
245
+ "thread_id": {
246
+ "type": "string"
247
+ },
248
+ "execution_time": {
249
+ "type": "number"
250
+ }
251
+ },
252
+ "additionalProperties": false,
253
+ "required": [
254
+ "unique_id",
255
+ "max_loaded_at",
256
+ "snapshotted_at",
257
+ "max_loaded_at_time_ago_in_s",
258
+ "status",
259
+ "criteria",
260
+ "adapter_response",
261
+ "timing",
262
+ "thread_id",
263
+ "execution_time"
264
+ ]
265
+ }
266
+ ]
267
+ }
268
+ },
269
+ "elapsed_time": {
270
+ "type": "number"
271
+ }
272
+ },
273
+ "additionalProperties": false,
274
+ "required": [
275
+ "metadata",
276
+ "results",
277
+ "elapsed_time"
278
+ ],
279
+ "$id": "https://schemas.getdbt.com/dbt/sources/v3.json"
280
+ }
@@ -0,0 +1,27 @@
1
+ #
2
+ # Licensed to the Apache Software Foundation (ASF) under one or more
3
+ # contributor license agreements. See the NOTICE file distributed with
4
+ # this work for additional information regarding copyright ownership.
5
+ # The ASF licenses this file to You under the Apache License, Version 2.0
6
+ # (the "License"); you may not use this file except in compliance with
7
+ # the License. You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+
18
+ import os
19
+
20
+
21
+ def get_project_root() -> str:
22
+ """Get the path to the project root.
23
+
24
+ Returns:
25
+ str: the path to the project root.
26
+ """
27
+ return os.path.abspath(os.path.dirname(os.path.dirname(__file__)))