altimate-datapilot-cli 0.0.14__py3-none-any.whl → 0.0.15__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.
- {altimate_datapilot_cli-0.0.14.dist-info → altimate_datapilot_cli-0.0.15.dist-info}/METADATA +7 -7
- {altimate_datapilot_cli-0.0.14.dist-info → altimate_datapilot_cli-0.0.15.dist-info}/RECORD +20 -19
- datapilot/__init__.py +1 -1
- datapilot/constants.py +7 -0
- datapilot/core/platforms/dbt/insights/checks/check_model_has_labels_keys.py +1 -1
- datapilot/core/platforms/dbt/insights/checks/check_model_has_meta_keys.py +1 -1
- datapilot/core/platforms/dbt/insights/checks/check_source_has_freshness.py +1 -1
- datapilot/core/platforms/dbt/insights/checks/check_source_has_labels_keys.py +1 -1
- datapilot/core/platforms/dbt/insights/checks/check_source_has_meta_keys.py +1 -1
- datapilot/core/platforms/dbt/schemas/catalog.py +21 -13
- datapilot/core/platforms/dbt/schemas/manifest.py +41 -27
- datapilot/core/platforms/dbt/wrappers/manifest/v10/wrapper.py +77 -64
- datapilot/core/platforms/dbt/wrappers/manifest/v11/wrapper.py +88 -75
- datapilot/core/platforms/dbt/wrappers/manifest/v12/schemas.py +13 -13
- datapilot/core/platforms/dbt/wrappers/manifest/v12/wrapper.py +20 -19
- {altimate_datapilot_cli-0.0.14.dist-info → altimate_datapilot_cli-0.0.15.dist-info}/AUTHORS.rst +0 -0
- {altimate_datapilot_cli-0.0.14.dist-info → altimate_datapilot_cli-0.0.15.dist-info}/LICENSE +0 -0
- {altimate_datapilot_cli-0.0.14.dist-info → altimate_datapilot_cli-0.0.15.dist-info}/WHEEL +0 -0
- {altimate_datapilot_cli-0.0.14.dist-info → altimate_datapilot_cli-0.0.15.dist-info}/entry_points.txt +0 -0
- {altimate_datapilot_cli-0.0.14.dist-info → altimate_datapilot_cli-0.0.15.dist-info}/top_level.txt +0 -0
{altimate_datapilot_cli-0.0.14.dist-info → altimate_datapilot_cli-0.0.15.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: altimate-datapilot-cli
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.15
|
4
4
|
Summary: Assistant for Data Teams
|
5
5
|
Home-page: https://github.com/AltimateAI/datapilot-cli
|
6
6
|
Author: Altimate Inc
|
@@ -30,12 +30,12 @@ Classifier: Topic :: Utilities
|
|
30
30
|
Requires-Python: >=3.8
|
31
31
|
License-File: LICENSE
|
32
32
|
License-File: AUTHORS.rst
|
33
|
-
Requires-Dist: click
|
34
|
-
Requires-Dist: dbt-artifacts-parser
|
35
|
-
Requires-Dist: ruamel.yaml
|
36
|
-
Requires-Dist: tabulate
|
37
|
-
Requires-Dist: requests
|
38
|
-
Requires-Dist: sqlglot
|
33
|
+
Requires-Dist: click~=8.1.7
|
34
|
+
Requires-Dist: dbt-artifacts-parser~=0.8.1
|
35
|
+
Requires-Dist: ruamel.yaml~=0.18.6
|
36
|
+
Requires-Dist: tabulate~=0.9.0
|
37
|
+
Requires-Dist: requests~=2.31.0
|
38
|
+
Requires-Dist: sqlglot~=25.30.0
|
39
39
|
|
40
40
|
========
|
41
41
|
Overview
|
@@ -1,5 +1,6 @@
|
|
1
|
-
datapilot/__init__.py,sha256=
|
1
|
+
datapilot/__init__.py,sha256=go20U3RCVaJ2N55RnX4tO5rinfUCRV0puFyrHCto8yw,23
|
2
2
|
datapilot/__main__.py,sha256=I9USmeNnK-cAHb6LZfydJC0LeNSE8enieeY55wpR6uw,380
|
3
|
+
datapilot/constants.py,sha256=h0gfZ8qVyTEi0k7NFOQyH4Z1cPU2zb2W7GsoXASgpxg,112
|
3
4
|
datapilot/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
5
|
datapilot/cli/main.py,sha256=VSdqlkCiu8GSG9qQh8q0BzyocsQc4lKWxZAPEsjXF18,181
|
5
6
|
datapilot/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -44,8 +45,8 @@ datapilot/core/platforms/dbt/insights/checks/check_column_name_contract.py,sha25
|
|
44
45
|
datapilot/core/platforms/dbt/insights/checks/check_macro_args_have_desc.py,sha256=Px-gBR0dx9z-xLOcp2ctDuKMRKK4ai554woMpeBFGFs,3185
|
45
46
|
datapilot/core/platforms/dbt/insights/checks/check_macro_has_desc.py,sha256=UrMYyZpi97gIBvH7leu5z27BowaFfPl0tOI4dqMSJmQ,2802
|
46
47
|
datapilot/core/platforms/dbt/insights/checks/check_model_has_all_columns.py,sha256=LULWYrGHrXiEcFfv5VxbrQ3quw4h5mLn3Sd_pG4ayug,4277
|
47
|
-
datapilot/core/platforms/dbt/insights/checks/check_model_has_labels_keys.py,sha256
|
48
|
-
datapilot/core/platforms/dbt/insights/checks/check_model_has_meta_keys.py,sha256=
|
48
|
+
datapilot/core/platforms/dbt/insights/checks/check_model_has_labels_keys.py,sha256=-cxWasRTJbZBhCd4JtTeygEJ90-m7v1YyhUzn0Jdjmw,5189
|
49
|
+
datapilot/core/platforms/dbt/insights/checks/check_model_has_meta_keys.py,sha256=QClFNsYlxy8nvmf8LyJENk8kT624Cas9l78qSXjs868,5009
|
49
50
|
datapilot/core/platforms/dbt/insights/checks/check_model_has_properties_file.py,sha256=hyl51rqSGmbj5DINtL5Dvex80SGSmN2o-qf_U6eaNMg,2968
|
50
51
|
datapilot/core/platforms/dbt/insights/checks/check_model_has_tests_by_group.py,sha256=d2Csu6EAapFx6eIXuCaCdNllbsjIBVab5QmlIv-SqGM,5706
|
51
52
|
datapilot/core/platforms/dbt/insights/checks/check_model_has_tests_by_name.py,sha256=bu87eQ5yZYZHtmdMEoIUA1Ynv8Tw3UGwCYKB_1_AXDI,5187
|
@@ -59,10 +60,10 @@ datapilot/core/platforms/dbt/insights/checks/check_model_tags.py,sha256=-268fA2k
|
|
59
60
|
datapilot/core/platforms/dbt/insights/checks/check_source_childs.py,sha256=L8W66Hauwjg98OCE3NFfTzXIbmT0XehD2TysiaPe-Eo,4254
|
60
61
|
datapilot/core/platforms/dbt/insights/checks/check_source_columns_have_desc.py,sha256=UzohMY6PGH_d-VCVJxvAbDI_DqeQqukmCpKU9W9fk_g,4453
|
61
62
|
datapilot/core/platforms/dbt/insights/checks/check_source_has_all_columns.py,sha256=AkAyNas0_dl7EN-hZitN33nTaAM11zsNvlGJjLnZOd0,4650
|
62
|
-
datapilot/core/platforms/dbt/insights/checks/check_source_has_freshness.py,sha256=
|
63
|
-
datapilot/core/platforms/dbt/insights/checks/check_source_has_labels_keys.py,sha256=
|
63
|
+
datapilot/core/platforms/dbt/insights/checks/check_source_has_freshness.py,sha256=1KP6g_-98hyjs3dTibFJFgBm97x_hJCeIYHdUR2HKDs,4117
|
64
|
+
datapilot/core/platforms/dbt/insights/checks/check_source_has_labels_keys.py,sha256=UMEd2inyjQMNk7scnn196yoPtQYfOynS4nVGoyGpsqc,5262
|
64
65
|
datapilot/core/platforms/dbt/insights/checks/check_source_has_loader.py,sha256=d3KixZeAVTlcKl8t-ap2n7pZU0qXDBeXYzjf813GkEE,2772
|
65
|
-
datapilot/core/platforms/dbt/insights/checks/check_source_has_meta_keys.py,sha256=
|
66
|
+
datapilot/core/platforms/dbt/insights/checks/check_source_has_meta_keys.py,sha256=e4RNkMgGLRxOzqidMRZWKQgDdlFlB7LhHpoWlB5cJrQ,5239
|
66
67
|
datapilot/core/platforms/dbt/insights/checks/check_source_has_tests.py,sha256=M7WWX1ud49FnInS_htvmNa_8gIjVuhk9tIuq7Q-4P5E,3711
|
67
68
|
datapilot/core/platforms/dbt/insights/checks/check_source_has_tests_by_group.py,sha256=tvflQTxgdejTecDBspD6PdLLDHIWXY-_4uOzPWWqh2w,5550
|
68
69
|
datapilot/core/platforms/dbt/insights/checks/check_source_has_tests_by_name.py,sha256=wDNYB0ZGx_hV8DxXewR1TtZ_HnozZN1Dyk0YOlGUoEs,5159
|
@@ -109,8 +110,8 @@ datapilot/core/platforms/dbt/insights/structure/model_naming_conventions.py,sha2
|
|
109
110
|
datapilot/core/platforms/dbt/insights/structure/source_directories_structure.py,sha256=K-xTjYltuzcHH51s6PbFYcrnqpSCYluTbrzW1JT_vIU,3675
|
110
111
|
datapilot/core/platforms/dbt/insights/structure/test_directory_structure.py,sha256=XL6YQgWmf397W2OwBmT7L8zUN93M1bOZBTp4PlngqlI,3484
|
111
112
|
datapilot/core/platforms/dbt/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
112
|
-
datapilot/core/platforms/dbt/schemas/catalog.py,sha256=
|
113
|
-
datapilot/core/platforms/dbt/schemas/manifest.py,sha256=
|
113
|
+
datapilot/core/platforms/dbt/schemas/catalog.py,sha256=t8qDw2QTI6e3TMeVt_apw9L-WAe8JyPyZS6nf61m4rc,2023
|
114
|
+
datapilot/core/platforms/dbt/schemas/manifest.py,sha256=zBr6-NgpKx06hQnw5yHmBwR0lOl2L8zyNISvN-eWD6g,14401
|
114
115
|
datapilot/core/platforms/dbt/wrappers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
115
116
|
datapilot/core/platforms/dbt/wrappers/catalog/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
116
117
|
datapilot/core/platforms/dbt/wrappers/catalog/wrapper.py,sha256=LDjt4pSiqGAmvI5DSPzEubwq13N1MKv9xakLNhG-BWY,196
|
@@ -120,13 +121,13 @@ datapilot/core/platforms/dbt/wrappers/manifest/__init__.py,sha256=47DEQpj8HBSa-_
|
|
120
121
|
datapilot/core/platforms/dbt/wrappers/manifest/wrapper.py,sha256=Q9DG-OEyJAa4ePoVhxG78pehfNotNc9A3xtz171fLhU,1189
|
121
122
|
datapilot/core/platforms/dbt/wrappers/manifest/v10/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
122
123
|
datapilot/core/platforms/dbt/wrappers/manifest/v10/schemas.py,sha256=VxqIFQbAL88ObQW1E8wPpiuooCdawdACJUFhgAYBxmo,1523
|
123
|
-
datapilot/core/platforms/dbt/wrappers/manifest/v10/wrapper.py,sha256=
|
124
|
+
datapilot/core/platforms/dbt/wrappers/manifest/v10/wrapper.py,sha256=jXF_HDoBMR5r7IPNcL3YGAvY0ZEFpTmda0uNiElbJbY,18057
|
124
125
|
datapilot/core/platforms/dbt/wrappers/manifest/v11/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
125
126
|
datapilot/core/platforms/dbt/wrappers/manifest/v11/schemas.py,sha256=Mb0N48czcwQTz5mxQx2QlVINzz50A5FUm0kMJ-Nzs6A,1523
|
126
|
-
datapilot/core/platforms/dbt/wrappers/manifest/v11/wrapper.py,sha256=
|
127
|
+
datapilot/core/platforms/dbt/wrappers/manifest/v11/wrapper.py,sha256=vuGFupQHyAJokWkgdzXmZd67S04nRkH89fEYCXeJWa0,17991
|
127
128
|
datapilot/core/platforms/dbt/wrappers/manifest/v12/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
128
|
-
datapilot/core/platforms/dbt/wrappers/manifest/v12/schemas.py,sha256=
|
129
|
-
datapilot/core/platforms/dbt/wrappers/manifest/v12/wrapper.py,sha256=
|
129
|
+
datapilot/core/platforms/dbt/wrappers/manifest/v12/schemas.py,sha256=2rMEQ_BCcjiibfrlDKwgCE8vFX_6BzSInpilpVTWrNE,1269
|
130
|
+
datapilot/core/platforms/dbt/wrappers/manifest/v12/wrapper.py,sha256=lAQY7rAI2luQep4sPogi1swVzcAZ_z5VzGwIl2XpKe0,17926
|
130
131
|
datapilot/core/platforms/dbt/wrappers/run_results/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
131
132
|
datapilot/core/platforms/dbt/wrappers/run_results/run_results.py,sha256=3E_y1gAF491WmXt-Z_Fqhr5BU-kVnzjHpZZv5UpOx-s,1267
|
132
133
|
datapilot/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -139,10 +140,10 @@ datapilot/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
139
140
|
datapilot/utils/utils.py,sha256=MY8q6ZBJ0hkrTuH7gWMxAlEAQGrajXFMabEhtGtT7sc,11524
|
140
141
|
datapilot/utils/formatting/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
141
142
|
datapilot/utils/formatting/utils.py,sha256=rAVmIYuldvw9VvCSwG2kMTEgiT7cEconp_F1sAWVyCo,1377
|
142
|
-
altimate_datapilot_cli-0.0.
|
143
|
-
altimate_datapilot_cli-0.0.
|
144
|
-
altimate_datapilot_cli-0.0.
|
145
|
-
altimate_datapilot_cli-0.0.
|
146
|
-
altimate_datapilot_cli-0.0.
|
147
|
-
altimate_datapilot_cli-0.0.
|
148
|
-
altimate_datapilot_cli-0.0.
|
143
|
+
altimate_datapilot_cli-0.0.15.dist-info/AUTHORS.rst,sha256=S4H4zw_v3GVyz5_55jF5Gf_YNG3s5Y0VgbQaEov9PFk,50
|
144
|
+
altimate_datapilot_cli-0.0.15.dist-info/LICENSE,sha256=Mf7VqpsmU2QR5_s2Cb_ZeeMB2Q9KW7YXJENZPFZRK1k,1100
|
145
|
+
altimate_datapilot_cli-0.0.15.dist-info/METADATA,sha256=WKXEoLY1k78gtF1S4mw3IYJZUu2Butum_gkDHf_n0dI,2382
|
146
|
+
altimate_datapilot_cli-0.0.15.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
147
|
+
altimate_datapilot_cli-0.0.15.dist-info/entry_points.txt,sha256=0zwgKxN40RLVB5jSmlJz7IH_FBqRtpFdbrdZn-xuQIY,141
|
148
|
+
altimate_datapilot_cli-0.0.15.dist-info/top_level.txt,sha256=gAOFOdwB00vcxv74y4M1J-nQtPvEatU8-mYViEBcToo,10
|
149
|
+
altimate_datapilot_cli-0.0.15.dist-info/RECORD,,
|
datapilot/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "0.0.
|
1
|
+
__version__ = "0.0.15"
|
datapilot/constants.py
ADDED
@@ -76,7 +76,7 @@ class CheckModelHasLabelsKeys(ChecksInsight):
|
|
76
76
|
def _check_labels_keys(self, node_id) -> Tuple[int, Set[str]]:
|
77
77
|
status_code = 0
|
78
78
|
missing_keys = set(self.labels_keys) - set(self.get_node(node_id).label)
|
79
|
-
config = self.get_node(node_id).config.
|
79
|
+
config = self.get_node(node_id).config.model_dump() if self.get_node(node_id).config else {}
|
80
80
|
labels = config.get("labels", {})
|
81
81
|
label_keys = set(labels.keys())
|
82
82
|
extra_keys = set()
|
@@ -72,7 +72,7 @@ class CheckModelHasMetaKeys(ChecksInsight):
|
|
72
72
|
def _check_meta_keys(self, node_id) -> Tuple[int, Set[str], Set[str]]:
|
73
73
|
status_code = 0
|
74
74
|
model = self.get_node(node_id)
|
75
|
-
meta = model.meta
|
75
|
+
meta = model.meta if model.meta else {}
|
76
76
|
model_meta_keys = set(meta.keys())
|
77
77
|
missing_keys = None
|
78
78
|
extra_keys = None
|
@@ -61,7 +61,7 @@ class CheckSourceHasFreshness(ChecksInsight):
|
|
61
61
|
|
62
62
|
def _check_source_has_freshness(self, source_id: str) -> List[str]:
|
63
63
|
source = self.get_node(source_id)
|
64
|
-
freshness = source.freshness.
|
64
|
+
freshness = source.freshness.model_dump() if source.freshness else {}
|
65
65
|
|
66
66
|
if not freshness:
|
67
67
|
return False
|
@@ -74,7 +74,7 @@ class CheckSourceHasLabelsKeys(ChecksInsight):
|
|
74
74
|
def _check_labels_keys(self, node_id) -> Tuple[int, Set[str]]:
|
75
75
|
status_code = 0
|
76
76
|
missing_keys = set(self.labels_keys) - set(self.get_node(node_id).label)
|
77
|
-
config = self.get_node(node_id).config.
|
77
|
+
config = self.get_node(node_id).config.model_dump() if self.get_node(node_id).config else {}
|
78
78
|
labels = config.get("labels", {})
|
79
79
|
label_keys = set(labels.keys())
|
80
80
|
extra_keys = set()
|
@@ -81,7 +81,7 @@ class CheckSourceHasMetaKeys(ChecksInsight):
|
|
81
81
|
def _check_source_has_meta_keys(self, source_unique_id: str):
|
82
82
|
status_code = 0
|
83
83
|
model = self.get_node(source_unique_id)
|
84
|
-
meta = model.meta
|
84
|
+
meta = model.meta if model.meta else {}
|
85
85
|
model_meta_keys = set(meta.keys())
|
86
86
|
missing_keys = None
|
87
87
|
extra_keys = None
|
@@ -5,13 +5,16 @@ from typing import List
|
|
5
5
|
from typing import Optional
|
6
6
|
from typing import Union
|
7
7
|
|
8
|
-
from pydantic
|
8
|
+
from pydantic import ConfigDict
|
9
9
|
from pydantic.main import BaseModel
|
10
10
|
|
11
|
+
from datapilot.constants import Extra
|
12
|
+
|
11
13
|
|
12
14
|
class AltimateCatalogMetadata(BaseModel):
|
13
|
-
|
14
|
-
extra
|
15
|
+
model_config = ConfigDict(
|
16
|
+
extra=Extra.forbid,
|
17
|
+
)
|
15
18
|
|
16
19
|
dbt_schema_version: Optional[str] = "https://schemas.getdbt.com/dbt/catalog/v1.json"
|
17
20
|
dbt_version: Optional[str] = "0.19.0"
|
@@ -21,8 +24,9 @@ class AltimateCatalogMetadata(BaseModel):
|
|
21
24
|
|
22
25
|
|
23
26
|
class AltimateCatalogTableMetadata(BaseModel):
|
24
|
-
|
25
|
-
extra
|
27
|
+
model_config = ConfigDict(
|
28
|
+
extra=Extra.forbid,
|
29
|
+
)
|
26
30
|
|
27
31
|
type: str
|
28
32
|
database: Optional[Optional[str]] = None
|
@@ -33,8 +37,9 @@ class AltimateCatalogTableMetadata(BaseModel):
|
|
33
37
|
|
34
38
|
|
35
39
|
class AltimateCatalogColumnMetadata(BaseModel):
|
36
|
-
|
37
|
-
extra
|
40
|
+
model_config = ConfigDict(
|
41
|
+
extra=Extra.forbid,
|
42
|
+
)
|
38
43
|
|
39
44
|
type: str
|
40
45
|
comment: Optional[Optional[str]] = None
|
@@ -43,8 +48,9 @@ class AltimateCatalogColumnMetadata(BaseModel):
|
|
43
48
|
|
44
49
|
|
45
50
|
class AltimateCatalogStatsItem(BaseModel):
|
46
|
-
|
47
|
-
extra
|
51
|
+
model_config = ConfigDict(
|
52
|
+
extra=Extra.forbid,
|
53
|
+
)
|
48
54
|
|
49
55
|
id: str
|
50
56
|
label: str
|
@@ -54,8 +60,9 @@ class AltimateCatalogStatsItem(BaseModel):
|
|
54
60
|
|
55
61
|
|
56
62
|
class AltimateCatalogTable(BaseModel):
|
57
|
-
|
58
|
-
extra
|
63
|
+
model_config = ConfigDict(
|
64
|
+
extra=Extra.forbid,
|
65
|
+
)
|
59
66
|
|
60
67
|
metadata: AltimateCatalogTableMetadata
|
61
68
|
columns: Dict[str, AltimateCatalogColumnMetadata]
|
@@ -64,8 +71,9 @@ class AltimateCatalogTable(BaseModel):
|
|
64
71
|
|
65
72
|
|
66
73
|
class AltimateCatalogCatalogV1(BaseModel):
|
67
|
-
|
68
|
-
extra
|
74
|
+
model_config = ConfigDict(
|
75
|
+
extra=Extra.forbid,
|
76
|
+
)
|
69
77
|
|
70
78
|
metadata: AltimateCatalogMetadata
|
71
79
|
nodes: Dict[str, AltimateCatalogTable]
|
@@ -19,7 +19,9 @@ from dbt_artifacts_parser.parsers.manifest.manifest_v10 import ManifestV10
|
|
19
19
|
from dbt_artifacts_parser.parsers.manifest.manifest_v11 import ManifestV11
|
20
20
|
from dbt_artifacts_parser.parsers.manifest.manifest_v11 import SupportedLanguage
|
21
21
|
from pydantic import BaseModel
|
22
|
-
from pydantic import
|
22
|
+
from pydantic import ConfigDict
|
23
|
+
|
24
|
+
from datapilot.constants import Extra
|
23
25
|
|
24
26
|
|
25
27
|
class DBTVersion(BaseModel):
|
@@ -46,16 +48,17 @@ Catalog = CatalogV1
|
|
46
48
|
|
47
49
|
|
48
50
|
class AltimateDocs(BaseModel):
|
49
|
-
|
50
|
-
extra
|
51
|
+
model_config = ConfigDict(
|
52
|
+
extra=Extra.forbid,
|
53
|
+
)
|
51
54
|
|
52
55
|
show: Optional[bool] = True
|
53
56
|
node_color: Optional[Optional[str]] = None
|
54
57
|
|
55
58
|
|
56
59
|
class AltimateDependsOn(BaseModel):
|
57
|
-
nodes: Optional[List[str]]
|
58
|
-
macros: Optional[List[str]]
|
60
|
+
nodes: Optional[List[str]] = None
|
61
|
+
macros: Optional[List[str]] = None
|
59
62
|
|
60
63
|
|
61
64
|
class AltimateManifestColumnInfo(BaseModel):
|
@@ -98,8 +101,9 @@ class AltimateAccess(Enum):
|
|
98
101
|
|
99
102
|
|
100
103
|
class AltimateDBTContract(BaseModel):
|
101
|
-
|
102
|
-
extra
|
104
|
+
model_config = ConfigDict(
|
105
|
+
extra=Extra.forbid,
|
106
|
+
)
|
103
107
|
|
104
108
|
enforced: Optional[bool] = False
|
105
109
|
alias_types: Optional[bool] = True
|
@@ -107,8 +111,9 @@ class AltimateDBTContract(BaseModel):
|
|
107
111
|
|
108
112
|
|
109
113
|
class AltimateHook(BaseModel):
|
110
|
-
|
111
|
-
extra
|
114
|
+
model_config = ConfigDict(
|
115
|
+
extra=Extra.forbid,
|
116
|
+
)
|
112
117
|
|
113
118
|
sql: str
|
114
119
|
transaction: Optional[bool] = True
|
@@ -117,8 +122,9 @@ class AltimateHook(BaseModel):
|
|
117
122
|
|
118
123
|
# TODO: Need to add the rest of the fields
|
119
124
|
class AltimateNodeConfig(BaseModel):
|
120
|
-
|
121
|
-
extra
|
125
|
+
model_config = ConfigDict(
|
126
|
+
extra=Extra.allow,
|
127
|
+
)
|
122
128
|
|
123
129
|
_extra: Optional[Dict[str, Any]] = None
|
124
130
|
enabled: Optional[bool] = True
|
@@ -203,8 +209,9 @@ class AltimateSourceConfig(BaseModel):
|
|
203
209
|
|
204
210
|
|
205
211
|
class AltimateDeferRelation(BaseModel):
|
206
|
-
|
207
|
-
extra
|
212
|
+
model_config = ConfigDict(
|
213
|
+
extra=Extra.forbid,
|
214
|
+
)
|
208
215
|
|
209
216
|
database: Optional[str]
|
210
217
|
schema_name: str
|
@@ -213,8 +220,9 @@ class AltimateDeferRelation(BaseModel):
|
|
213
220
|
|
214
221
|
|
215
222
|
class AltimateSeedConfig(BaseModel):
|
216
|
-
|
217
|
-
extra
|
223
|
+
model_config = ConfigDict(
|
224
|
+
extra=Extra.allow,
|
225
|
+
)
|
218
226
|
|
219
227
|
_extra: Optional[Dict[str, Any]] = None
|
220
228
|
enabled: Optional[bool] = True
|
@@ -314,8 +322,9 @@ class AltimateExposureType(Enum):
|
|
314
322
|
|
315
323
|
|
316
324
|
class AltimateOwner(BaseModel):
|
317
|
-
|
318
|
-
extra
|
325
|
+
model_config = ConfigDict(
|
326
|
+
extra=Extra.allow,
|
327
|
+
)
|
319
328
|
|
320
329
|
_extra: Optional[Dict[str, Any]] = None
|
321
330
|
email: Optional[Optional[str]] = None
|
@@ -329,8 +338,9 @@ class AltimateMaturityEnum(Enum):
|
|
329
338
|
|
330
339
|
|
331
340
|
class AltimateRefArgs(BaseModel):
|
332
|
-
|
333
|
-
extra
|
341
|
+
model_config = ConfigDict(
|
342
|
+
extra=Extra.forbid,
|
343
|
+
)
|
334
344
|
|
335
345
|
name: str
|
336
346
|
package: Optional[Optional[str]] = None
|
@@ -338,8 +348,9 @@ class AltimateRefArgs(BaseModel):
|
|
338
348
|
|
339
349
|
|
340
350
|
class AltimateExposureConfig(BaseModel):
|
341
|
-
|
342
|
-
extra
|
351
|
+
model_config = ConfigDict(
|
352
|
+
extra=Extra.allow,
|
353
|
+
)
|
343
354
|
|
344
355
|
_extra: Optional[Dict[str, Any]] = None
|
345
356
|
enabled: Optional[bool] = True
|
@@ -371,8 +382,9 @@ class AltimateManifestExposureNode(BaseModel):
|
|
371
382
|
|
372
383
|
|
373
384
|
class AltimateTestMetadata(BaseModel):
|
374
|
-
|
375
|
-
extra
|
385
|
+
model_config = ConfigDict(
|
386
|
+
extra=Extra.forbid,
|
387
|
+
)
|
376
388
|
|
377
389
|
name: str
|
378
390
|
kwargs: Optional[Dict[str, Any]] = None
|
@@ -380,8 +392,9 @@ class AltimateTestMetadata(BaseModel):
|
|
380
392
|
|
381
393
|
|
382
394
|
class AltimateTestConfig(BaseModel):
|
383
|
-
|
384
|
-
extra
|
395
|
+
model_config = ConfigDict(
|
396
|
+
extra=Extra.allow,
|
397
|
+
)
|
385
398
|
|
386
399
|
_extra: Optional[Dict[str, Any]] = None
|
387
400
|
enabled: Optional[bool] = True
|
@@ -433,8 +446,9 @@ class AltimateManifestTestNode(BaseModel):
|
|
433
446
|
|
434
447
|
|
435
448
|
class AltimateMacroArgument(BaseModel):
|
436
|
-
|
437
|
-
extra
|
449
|
+
model_config = ConfigDict(
|
450
|
+
extra=Extra.forbid,
|
451
|
+
)
|
438
452
|
|
439
453
|
name: str
|
440
454
|
type: Optional[Optional[str]] = None
|
@@ -116,6 +116,7 @@ class ManifestV10Wrapper(BaseManifestWrapper):
|
|
116
116
|
contract=contract,
|
117
117
|
meta=node.meta,
|
118
118
|
patch_path=node.patch_path,
|
119
|
+
access=node.access.value,
|
119
120
|
)
|
120
121
|
|
121
122
|
def _get_source(self, source: SourceNode) -> AltimateManifestSourceNode:
|
@@ -133,10 +134,10 @@ class ManifestV10Wrapper(BaseManifestWrapper):
|
|
133
134
|
source_description=source.source_description,
|
134
135
|
loader=source.loader,
|
135
136
|
identifier=source.identifier,
|
136
|
-
quoting=AltimateQuoting(**source.quoting.
|
137
|
+
quoting=AltimateQuoting(**source.quoting.model_dump()) if source.quoting else None,
|
137
138
|
loaded_at_field=source.loaded_at_field,
|
138
|
-
freshness=AltimateFreshnessThreshold(**source.freshness.
|
139
|
-
external=AltimateExternalTable(**source.external.
|
139
|
+
freshness=AltimateFreshnessThreshold(**source.freshness.model_dump()) if source.freshness else None,
|
140
|
+
external=AltimateExternalTable(**source.external.model_dump()) if source.external else None,
|
140
141
|
description=source.description,
|
141
142
|
columns={
|
142
143
|
name: AltimateManifestColumnInfo(
|
@@ -153,7 +154,7 @@ class ManifestV10Wrapper(BaseManifestWrapper):
|
|
153
154
|
relation_name=source.relation_name,
|
154
155
|
source_meta=source.source_meta,
|
155
156
|
tags=source.tags,
|
156
|
-
config=AltimateSourceConfig(**source.config.
|
157
|
+
config=AltimateSourceConfig(**source.config.model_dump()) if source.config else None,
|
157
158
|
patch_path=source.patch_path,
|
158
159
|
unrendered_config=source.unrendered_config,
|
159
160
|
created_at=source.created_at,
|
@@ -177,9 +178,9 @@ class ManifestV10Wrapper(BaseManifestWrapper):
|
|
177
178
|
),
|
178
179
|
description=macro.description,
|
179
180
|
meta=macro.meta,
|
180
|
-
docs=macro.docs,
|
181
|
+
docs=macro.docs.model_dump() if macro.docs else None,
|
181
182
|
patch_path=macro.patch_path,
|
182
|
-
arguments=[AltimateMacroArgument(**arg.
|
183
|
+
arguments=[AltimateMacroArgument(**arg.model_dump()) for arg in macro.arguments] if macro.arguments else None,
|
183
184
|
created_at=macro.created_at,
|
184
185
|
supported_languages=macro.supported_languages,
|
185
186
|
)
|
@@ -194,22 +195,24 @@ class ManifestV10Wrapper(BaseManifestWrapper):
|
|
194
195
|
unique_id=exposure.unique_id,
|
195
196
|
fqn=exposure.fqn,
|
196
197
|
type=AltimateExposureType(exposure.type.value) if exposure.type else None,
|
197
|
-
owner=AltimateOwner(**exposure.owner.
|
198
|
+
owner=AltimateOwner(**exposure.owner.model_dump()) if exposure.owner else None,
|
198
199
|
description=exposure.description,
|
199
200
|
label=exposure.label,
|
200
201
|
maturity=AltimateMaturityEnum(exposure.maturity.value) if exposure.maturity else None,
|
201
202
|
meta=exposure.meta,
|
202
203
|
tags=exposure.tags,
|
203
|
-
config=AltimateSourceConfig(**exposure.config.
|
204
|
+
config=AltimateSourceConfig(**exposure.config.model_dump()) if exposure.config else None,
|
204
205
|
unrendered_config=exposure.unrendered_config,
|
205
206
|
url=exposure.url,
|
206
|
-
depends_on=
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
207
|
+
depends_on=(
|
208
|
+
AltimateDependsOn(
|
209
|
+
nodes=exposure.depends_on.nodes,
|
210
|
+
macros=exposure.depends_on.macros,
|
211
|
+
)
|
212
|
+
if exposure.depends_on
|
213
|
+
else None
|
214
|
+
),
|
215
|
+
refs=[AltimateRefArgs(**ref.model_dump()) for ref in exposure.refs] if exposure.refs else None,
|
213
216
|
sources=exposure.sources,
|
214
217
|
metrics=exposure.metrics,
|
215
218
|
created_at=exposure.created_at,
|
@@ -219,7 +222,7 @@ class ManifestV10Wrapper(BaseManifestWrapper):
|
|
219
222
|
test_metadata = None
|
220
223
|
if isinstance(test, GenericTestNode):
|
221
224
|
test_type = GENERIC
|
222
|
-
test_metadata = AltimateTestMetadata(**test.test_metadata.
|
225
|
+
test_metadata = AltimateTestMetadata(**test.test_metadata.model_dump()) if test.test_metadata else None
|
223
226
|
elif isinstance(test, SingularTestNode):
|
224
227
|
test_type = SINGULAR
|
225
228
|
else:
|
@@ -235,42 +238,48 @@ class ManifestV10Wrapper(BaseManifestWrapper):
|
|
235
238
|
unique_id=test.unique_id,
|
236
239
|
fqn=test.fqn,
|
237
240
|
alias=test.alias,
|
238
|
-
checksum=
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
241
|
+
checksum=(
|
242
|
+
AltimateFileHash(
|
243
|
+
name=test.checksum.name,
|
244
|
+
checksum=test.checksum.checksum,
|
245
|
+
)
|
246
|
+
if test.checksum
|
247
|
+
else None
|
248
|
+
),
|
249
|
+
config=AltimateTestConfig(**test.config.model_dump()) if test.config else None,
|
245
250
|
description=test.description,
|
246
251
|
tags=test.tags,
|
247
|
-
columns=
|
248
|
-
|
249
|
-
name
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
252
|
+
columns=(
|
253
|
+
{
|
254
|
+
name: AltimateManifestColumnInfo(
|
255
|
+
name=column.name,
|
256
|
+
description=column.description,
|
257
|
+
meta=column.meta,
|
258
|
+
data_type=column.data_type,
|
259
|
+
quote=column.quote,
|
260
|
+
tags=column.tags,
|
261
|
+
)
|
262
|
+
for name, column in test.columns.items()
|
263
|
+
}
|
264
|
+
if test.columns
|
265
|
+
else None
|
266
|
+
),
|
260
267
|
meta=test.meta,
|
261
268
|
relation_name=test.relation_name,
|
262
269
|
group=test.group,
|
263
270
|
raw_code=test.raw_code,
|
264
271
|
language=test.language,
|
265
|
-
refs=[AltimateRefArgs(**ref.
|
272
|
+
refs=[AltimateRefArgs(**ref.model_dump()) for ref in test.refs] if test.refs else None,
|
266
273
|
sources=test.sources,
|
267
274
|
metrics=test.metrics,
|
268
|
-
depends_on=
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
275
|
+
depends_on=(
|
276
|
+
AltimateDependsOn(
|
277
|
+
nodes=test.depends_on.nodes,
|
278
|
+
macros=test.depends_on.macros,
|
279
|
+
)
|
280
|
+
if test.depends_on
|
281
|
+
else None
|
282
|
+
),
|
274
283
|
compiled_path=test.compiled_path,
|
275
284
|
compiled=test.compiled,
|
276
285
|
compiled_code=test.compiled_code,
|
@@ -288,31 +297,35 @@ class ManifestV10Wrapper(BaseManifestWrapper):
|
|
288
297
|
unique_id=seed.unique_id,
|
289
298
|
fqn=seed.fqn,
|
290
299
|
alias=seed.alias,
|
291
|
-
checksum=
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
300
|
+
checksum=(
|
301
|
+
AltimateFileHash(
|
302
|
+
name=seed.checksum.name,
|
303
|
+
checksum=seed.checksum.checksum,
|
304
|
+
)
|
305
|
+
if seed.checksum
|
306
|
+
else None
|
307
|
+
),
|
308
|
+
config=AltimateSeedConfig(**seed.config.model_dump()) if seed.config else None,
|
298
309
|
description=seed.description,
|
299
310
|
tags=seed.tags,
|
300
|
-
columns=
|
301
|
-
|
302
|
-
name
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
311
|
+
columns=(
|
312
|
+
{
|
313
|
+
name: AltimateManifestColumnInfo(
|
314
|
+
name=column.name,
|
315
|
+
description=column.description,
|
316
|
+
meta=column.meta,
|
317
|
+
data_type=column.data_type,
|
318
|
+
quote=column.quote,
|
319
|
+
tags=column.tags,
|
320
|
+
)
|
321
|
+
for name, column in seed.columns.items()
|
322
|
+
}
|
323
|
+
if seed.columns
|
324
|
+
else None
|
325
|
+
),
|
313
326
|
meta=seed.meta,
|
314
327
|
group=seed.group,
|
315
|
-
docs=seed.docs.
|
328
|
+
docs=seed.docs.model_dump() if seed.docs else None,
|
316
329
|
patch_path=seed.patch_path,
|
317
330
|
build_path=seed.build_path,
|
318
331
|
deferred=seed.deferred,
|
@@ -61,7 +61,7 @@ class ManifestV11Wrapper(BaseManifestWrapper):
|
|
61
61
|
language,
|
62
62
|
contract,
|
63
63
|
) = ([], [], None, None, None, None, None, "", "", None)
|
64
|
-
if node.resource_type
|
64
|
+
if node.resource_type != SEED:
|
65
65
|
sources = node.sources
|
66
66
|
metrics = node.metrics
|
67
67
|
depends_on_nodes = node.depends_on.nodes if node.depends_on else None
|
@@ -77,7 +77,7 @@ class ManifestV11Wrapper(BaseManifestWrapper):
|
|
77
77
|
database=node.database,
|
78
78
|
schema_name=node.schema_,
|
79
79
|
name=node.name,
|
80
|
-
resource_type=AltimateResourceType(node.resource_type
|
80
|
+
resource_type=AltimateResourceType(node.resource_type),
|
81
81
|
package_name=node.package_name,
|
82
82
|
path=node.path,
|
83
83
|
description=node.description,
|
@@ -116,12 +116,13 @@ class ManifestV11Wrapper(BaseManifestWrapper):
|
|
116
116
|
contract=contract,
|
117
117
|
meta=node.meta,
|
118
118
|
patch_path=node.patch_path,
|
119
|
+
access=node.access.value,
|
119
120
|
)
|
120
121
|
|
121
122
|
def _get_source(self, source: SourceNode) -> AltimateManifestSourceNode:
|
122
123
|
return AltimateManifestSourceNode(
|
123
124
|
database=source.database,
|
124
|
-
resource_type=AltimateResourceType(source.resource_type
|
125
|
+
resource_type=AltimateResourceType(source.resource_type),
|
125
126
|
schema_name=source.schema_,
|
126
127
|
name=source.name,
|
127
128
|
package_name=source.package_name,
|
@@ -133,10 +134,10 @@ class ManifestV11Wrapper(BaseManifestWrapper):
|
|
133
134
|
source_description=source.source_description,
|
134
135
|
loader=source.loader,
|
135
136
|
identifier=source.identifier,
|
136
|
-
quoting=AltimateQuoting(**source.quoting.
|
137
|
+
quoting=AltimateQuoting(**source.quoting.model_dump()) if source.quoting else None,
|
137
138
|
loaded_at_field=source.loaded_at_field,
|
138
|
-
freshness=AltimateFreshnessThreshold(**source.freshness.
|
139
|
-
external=AltimateExternalTable(**source.external.
|
139
|
+
freshness=AltimateFreshnessThreshold(**source.freshness.model_dump()) if source.freshness else None,
|
140
|
+
external=AltimateExternalTable(**source.external.model_dump()) if source.external else None,
|
140
141
|
description=source.description,
|
141
142
|
columns={
|
142
143
|
name: AltimateManifestColumnInfo(
|
@@ -153,7 +154,7 @@ class ManifestV11Wrapper(BaseManifestWrapper):
|
|
153
154
|
relation_name=source.relation_name,
|
154
155
|
source_meta=source.source_meta,
|
155
156
|
tags=source.tags,
|
156
|
-
config=AltimateSourceConfig(**source.config.
|
157
|
+
config=AltimateSourceConfig(**source.config.model_dump()) if source.config else None,
|
157
158
|
patch_path=source.patch_path,
|
158
159
|
unrendered_config=source.unrendered_config,
|
159
160
|
created_at=source.created_at,
|
@@ -162,7 +163,7 @@ class ManifestV11Wrapper(BaseManifestWrapper):
|
|
162
163
|
def _get_macro(self, macro: MacroNode) -> AltimateManifestMacroNode:
|
163
164
|
return AltimateManifestMacroNode(
|
164
165
|
name=macro.name,
|
165
|
-
resource_type=AltimateResourceType(macro.resource_type
|
166
|
+
resource_type=AltimateResourceType(macro.resource_type),
|
166
167
|
package_name=macro.package_name,
|
167
168
|
path=macro.path,
|
168
169
|
original_file_path=macro.original_file_path,
|
@@ -177,9 +178,9 @@ class ManifestV11Wrapper(BaseManifestWrapper):
|
|
177
178
|
),
|
178
179
|
description=macro.description,
|
179
180
|
meta=macro.meta,
|
180
|
-
docs=macro.docs,
|
181
|
+
docs=macro.docs.model_dump() if macro.docs else None,
|
181
182
|
patch_path=macro.patch_path,
|
182
|
-
arguments=[AltimateMacroArgument(**arg.
|
183
|
+
arguments=[AltimateMacroArgument(**arg.model_dump()) for arg in macro.arguments] if macro.arguments else None,
|
183
184
|
created_at=macro.created_at,
|
184
185
|
supported_languages=macro.supported_languages,
|
185
186
|
)
|
@@ -187,29 +188,31 @@ class ManifestV11Wrapper(BaseManifestWrapper):
|
|
187
188
|
def _get_exposure(self, exposure: ExposureNode) -> AltimateManifestExposureNode:
|
188
189
|
return AltimateManifestExposureNode(
|
189
190
|
name=exposure.name,
|
190
|
-
resource_type=AltimateResourceType(exposure.resource_type
|
191
|
+
resource_type=AltimateResourceType(exposure.resource_type),
|
191
192
|
package_name=exposure.package_name,
|
192
193
|
path=exposure.path,
|
193
194
|
original_file_path=exposure.original_file_path,
|
194
195
|
unique_id=exposure.unique_id,
|
195
196
|
fqn=exposure.fqn,
|
196
197
|
type=AltimateExposureType(exposure.type.value) if exposure.type else None,
|
197
|
-
owner=AltimateOwner(**exposure.owner.
|
198
|
+
owner=AltimateOwner(**exposure.owner.model_dump()) if exposure.owner else None,
|
198
199
|
description=exposure.description,
|
199
200
|
label=exposure.label,
|
200
201
|
maturity=AltimateMaturityEnum(exposure.maturity.value) if exposure.maturity else None,
|
201
202
|
meta=exposure.meta,
|
202
203
|
tags=exposure.tags,
|
203
|
-
config=AltimateSourceConfig(**exposure.config.
|
204
|
+
config=AltimateSourceConfig(**exposure.config.model_dump()) if exposure.config else None,
|
204
205
|
unrendered_config=exposure.unrendered_config,
|
205
206
|
url=exposure.url,
|
206
|
-
depends_on=
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
207
|
+
depends_on=(
|
208
|
+
AltimateDependsOn(
|
209
|
+
nodes=exposure.depends_on.nodes,
|
210
|
+
macros=exposure.depends_on.macros,
|
211
|
+
)
|
212
|
+
if exposure.depends_on
|
213
|
+
else None
|
214
|
+
),
|
215
|
+
refs=[AltimateRefArgs(**ref.model_dump()) for ref in exposure.refs] if exposure.refs else None,
|
213
216
|
sources=exposure.sources,
|
214
217
|
metrics=exposure.metrics,
|
215
218
|
created_at=exposure.created_at,
|
@@ -219,7 +222,7 @@ class ManifestV11Wrapper(BaseManifestWrapper):
|
|
219
222
|
test_metadata = None
|
220
223
|
if isinstance(test, GenericTestNode):
|
221
224
|
test_type = GENERIC
|
222
|
-
test_metadata = AltimateTestMetadata(**test.test_metadata.
|
225
|
+
test_metadata = AltimateTestMetadata(**test.test_metadata.model_dump()) if test.test_metadata else None
|
223
226
|
elif isinstance(test, SingularTestNode):
|
224
227
|
test_type = SINGULAR
|
225
228
|
else:
|
@@ -228,49 +231,55 @@ class ManifestV11Wrapper(BaseManifestWrapper):
|
|
228
231
|
test_metadata=test_metadata,
|
229
232
|
test_type=test_type,
|
230
233
|
name=test.name,
|
231
|
-
resource_type=AltimateResourceType(test.resource_type
|
234
|
+
resource_type=AltimateResourceType(test.resource_type),
|
232
235
|
package_name=test.package_name,
|
233
236
|
path=test.path,
|
234
237
|
original_file_path=test.original_file_path,
|
235
238
|
unique_id=test.unique_id,
|
236
239
|
fqn=test.fqn,
|
237
240
|
alias=test.alias,
|
238
|
-
checksum=
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
241
|
+
checksum=(
|
242
|
+
AltimateFileHash(
|
243
|
+
name=test.checksum.name,
|
244
|
+
checksum=test.checksum.checksum,
|
245
|
+
)
|
246
|
+
if test.checksum
|
247
|
+
else None
|
248
|
+
),
|
249
|
+
config=AltimateTestConfig(**test.config.model_dump()) if test.config else None,
|
245
250
|
description=test.description,
|
246
251
|
tags=test.tags,
|
247
|
-
columns=
|
248
|
-
|
249
|
-
name
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
252
|
+
columns=(
|
253
|
+
{
|
254
|
+
name: AltimateManifestColumnInfo(
|
255
|
+
name=column.name,
|
256
|
+
description=column.description,
|
257
|
+
meta=column.meta,
|
258
|
+
data_type=column.data_type,
|
259
|
+
quote=column.quote,
|
260
|
+
tags=column.tags,
|
261
|
+
)
|
262
|
+
for name, column in test.columns.items()
|
263
|
+
}
|
264
|
+
if test.columns
|
265
|
+
else None
|
266
|
+
),
|
260
267
|
meta=test.meta,
|
261
268
|
relation_name=test.relation_name,
|
262
269
|
group=test.group,
|
263
270
|
raw_code=test.raw_code,
|
264
271
|
language=test.language,
|
265
|
-
refs=[AltimateRefArgs(**ref.
|
272
|
+
refs=[AltimateRefArgs(**ref.model_dump()) for ref in test.refs] if test.refs else None,
|
266
273
|
sources=test.sources,
|
267
274
|
metrics=test.metrics,
|
268
|
-
depends_on=
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
275
|
+
depends_on=(
|
276
|
+
AltimateDependsOn(
|
277
|
+
nodes=test.depends_on.nodes,
|
278
|
+
macros=test.depends_on.macros,
|
279
|
+
)
|
280
|
+
if test.depends_on
|
281
|
+
else None
|
282
|
+
),
|
274
283
|
compiled_path=test.compiled_path,
|
275
284
|
compiled=test.compiled,
|
276
285
|
compiled_code=test.compiled_code,
|
@@ -281,38 +290,42 @@ class ManifestV11Wrapper(BaseManifestWrapper):
|
|
281
290
|
database=seed.database,
|
282
291
|
schema_name=seed.schema_,
|
283
292
|
name=seed.name,
|
284
|
-
resource_type=AltimateResourceType(seed.resource_type
|
293
|
+
resource_type=AltimateResourceType(seed.resource_type),
|
285
294
|
package_name=seed.package_name,
|
286
295
|
path=seed.path,
|
287
296
|
original_file_path=seed.original_file_path,
|
288
297
|
unique_id=seed.unique_id,
|
289
298
|
fqn=seed.fqn,
|
290
299
|
alias=seed.alias,
|
291
|
-
checksum=
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
300
|
+
checksum=(
|
301
|
+
AltimateFileHash(
|
302
|
+
name=seed.checksum.name,
|
303
|
+
checksum=seed.checksum.checksum,
|
304
|
+
)
|
305
|
+
if seed.checksum
|
306
|
+
else None
|
307
|
+
),
|
308
|
+
config=AltimateSeedConfig(**seed.config.model_dump()) if seed.config else None,
|
298
309
|
description=seed.description,
|
299
310
|
tags=seed.tags,
|
300
|
-
columns=
|
301
|
-
|
302
|
-
name
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
311
|
+
columns=(
|
312
|
+
{
|
313
|
+
name: AltimateManifestColumnInfo(
|
314
|
+
name=column.name,
|
315
|
+
description=column.description,
|
316
|
+
meta=column.meta,
|
317
|
+
data_type=column.data_type,
|
318
|
+
quote=column.quote,
|
319
|
+
tags=column.tags,
|
320
|
+
)
|
321
|
+
for name, column in seed.columns.items()
|
322
|
+
}
|
323
|
+
if seed.columns
|
324
|
+
else None
|
325
|
+
),
|
313
326
|
meta=seed.meta,
|
314
327
|
group=seed.group,
|
315
|
-
docs=seed.docs.
|
328
|
+
docs=seed.docs.model_dump() if seed.docs else None,
|
316
329
|
patch_path=seed.patch_path,
|
317
330
|
build_path=seed.build_path,
|
318
331
|
deferred=seed.deferred,
|
@@ -327,7 +340,7 @@ class ManifestV11Wrapper(BaseManifestWrapper):
|
|
327
340
|
nodes = {}
|
328
341
|
for node in self.manifest.nodes.values():
|
329
342
|
if (
|
330
|
-
node.resource_type
|
343
|
+
node.resource_type
|
331
344
|
in [
|
332
345
|
AltimateResourceType.seed.value,
|
333
346
|
AltimateResourceType.test.value,
|
@@ -350,7 +363,7 @@ class ManifestV11Wrapper(BaseManifestWrapper):
|
|
350
363
|
def get_macros(self) -> Dict[str, AltimateManifestMacroNode]:
|
351
364
|
macros = {}
|
352
365
|
for macro in self.manifest.macros.values():
|
353
|
-
if macro.resource_type
|
366
|
+
if macro.resource_type == AltimateResourceType.macro.value and macro.package_name == self.get_package():
|
354
367
|
macros[macro.unique_id] = self._get_macro(macro)
|
355
368
|
return macros
|
356
369
|
|
@@ -371,7 +384,7 @@ class ManifestV11Wrapper(BaseManifestWrapper):
|
|
371
384
|
|
372
385
|
for node in self.manifest.nodes.values():
|
373
386
|
# Check if the node is a test and of the correct type
|
374
|
-
if node.resource_type
|
387
|
+
if node.resource_type == AltimateResourceType.test.value:
|
375
388
|
if any(isinstance(node, t) for t in types):
|
376
389
|
tests[node.unique_id] = self._get_tests(node)
|
377
390
|
return tests
|
@@ -379,7 +392,7 @@ class ManifestV11Wrapper(BaseManifestWrapper):
|
|
379
392
|
def get_seeds(self) -> Dict[str, AltimateSeedNode]:
|
380
393
|
seeds = {}
|
381
394
|
for seed in self.manifest.nodes.values():
|
382
|
-
if seed.resource_type
|
395
|
+
if seed.resource_type == AltimateResourceType.seed.value:
|
383
396
|
seeds[seed.unique_id] = self._get_seed(seed)
|
384
397
|
return seeds
|
385
398
|
|
@@ -4,33 +4,33 @@ from typing import Union
|
|
4
4
|
|
5
5
|
from dbt_artifacts_parser.parsers.manifest.manifest_v12 import Exposures
|
6
6
|
from dbt_artifacts_parser.parsers.manifest.manifest_v12 import Macros
|
7
|
-
from dbt_artifacts_parser.parsers.manifest.manifest_v12 import
|
8
|
-
from dbt_artifacts_parser.parsers.manifest.manifest_v12 import
|
9
|
-
from dbt_artifacts_parser.parsers.manifest.manifest_v12 import
|
10
|
-
from dbt_artifacts_parser.parsers.manifest.manifest_v12 import
|
11
|
-
from dbt_artifacts_parser.parsers.manifest.manifest_v12 import
|
12
|
-
from dbt_artifacts_parser.parsers.manifest.manifest_v12 import
|
13
|
-
from dbt_artifacts_parser.parsers.manifest.manifest_v12 import
|
14
|
-
from dbt_artifacts_parser.parsers.manifest.manifest_v12 import
|
7
|
+
from dbt_artifacts_parser.parsers.manifest.manifest_v12 import Nodes
|
8
|
+
from dbt_artifacts_parser.parsers.manifest.manifest_v12 import Nodes1
|
9
|
+
from dbt_artifacts_parser.parsers.manifest.manifest_v12 import Nodes2
|
10
|
+
from dbt_artifacts_parser.parsers.manifest.manifest_v12 import Nodes3
|
11
|
+
from dbt_artifacts_parser.parsers.manifest.manifest_v12 import Nodes4
|
12
|
+
from dbt_artifacts_parser.parsers.manifest.manifest_v12 import Nodes5
|
13
|
+
from dbt_artifacts_parser.parsers.manifest.manifest_v12 import Nodes6
|
14
|
+
from dbt_artifacts_parser.parsers.manifest.manifest_v12 import Nodes7
|
15
15
|
from dbt_artifacts_parser.parsers.manifest.manifest_v12 import Sources
|
16
16
|
|
17
17
|
from datapilot.core.platforms.dbt.constants import GENERIC
|
18
18
|
from datapilot.core.platforms.dbt.constants import SINGULAR
|
19
19
|
|
20
|
-
ManifestNode = Union[
|
20
|
+
ManifestNode = Union[Nodes, Nodes1, Nodes2, Nodes3, Nodes4, Nodes5, Nodes6, Nodes7]
|
21
21
|
|
22
22
|
SourceNode = Sources
|
23
23
|
|
24
24
|
ExposureNode = Exposures
|
25
25
|
|
26
|
-
TestNode = Union[
|
26
|
+
TestNode = Union[Nodes6, Nodes2]
|
27
27
|
|
28
28
|
MacroNode = Macros
|
29
29
|
|
30
30
|
TEST_TYPE_TO_NODE_MAP: Dict[str, Type] = {
|
31
|
-
GENERIC: [
|
32
|
-
SINGULAR: [
|
31
|
+
GENERIC: [Nodes6],
|
32
|
+
SINGULAR: [Nodes2],
|
33
33
|
}
|
34
34
|
|
35
35
|
|
36
|
-
SeedNodeMap =
|
36
|
+
SeedNodeMap = Nodes
|
@@ -3,8 +3,8 @@ from typing import Optional
|
|
3
3
|
from typing import Set
|
4
4
|
|
5
5
|
from dbt_artifacts_parser.parsers.manifest.manifest_v12 import ManifestV12
|
6
|
-
from dbt_artifacts_parser.parsers.manifest.manifest_v12 import
|
7
|
-
from dbt_artifacts_parser.parsers.manifest.manifest_v12 import
|
6
|
+
from dbt_artifacts_parser.parsers.manifest.manifest_v12 import Nodes2
|
7
|
+
from dbt_artifacts_parser.parsers.manifest.manifest_v12 import Nodes6
|
8
8
|
|
9
9
|
from datapilot.core.platforms.dbt.constants import GENERIC
|
10
10
|
from datapilot.core.platforms.dbt.constants import OTHER_TEST_NODE
|
@@ -116,6 +116,7 @@ class ManifestV12Wrapper(BaseManifestWrapper):
|
|
116
116
|
contract=contract,
|
117
117
|
meta=node.meta,
|
118
118
|
patch_path=node.patch_path,
|
119
|
+
access=node.access.value,
|
119
120
|
)
|
120
121
|
|
121
122
|
def _get_source(self, source: SourceNode) -> AltimateManifestSourceNode:
|
@@ -133,10 +134,10 @@ class ManifestV12Wrapper(BaseManifestWrapper):
|
|
133
134
|
source_description=source.source_description,
|
134
135
|
loader=source.loader,
|
135
136
|
identifier=source.identifier,
|
136
|
-
quoting=AltimateQuoting(**source.quoting.
|
137
|
+
quoting=AltimateQuoting(**source.quoting.model_dump()) if source.quoting else None,
|
137
138
|
loaded_at_field=source.loaded_at_field,
|
138
|
-
freshness=AltimateFreshnessThreshold(**source.freshness.
|
139
|
-
external=AltimateExternalTable(**source.external.
|
139
|
+
freshness=AltimateFreshnessThreshold(**source.freshness.model_dump()) if source.freshness else None,
|
140
|
+
external=AltimateExternalTable(**source.external.model_dump()) if source.external else None,
|
140
141
|
description=source.description,
|
141
142
|
columns={
|
142
143
|
name: AltimateManifestColumnInfo(
|
@@ -153,7 +154,7 @@ class ManifestV12Wrapper(BaseManifestWrapper):
|
|
153
154
|
relation_name=source.relation_name,
|
154
155
|
source_meta=source.source_meta,
|
155
156
|
tags=source.tags,
|
156
|
-
config=AltimateSourceConfig(**source.config.
|
157
|
+
config=AltimateSourceConfig(**source.config.model_dump()) if source.config else None,
|
157
158
|
patch_path=source.patch_path,
|
158
159
|
unrendered_config=source.unrendered_config,
|
159
160
|
created_at=source.created_at,
|
@@ -177,9 +178,9 @@ class ManifestV12Wrapper(BaseManifestWrapper):
|
|
177
178
|
),
|
178
179
|
description=macro.description,
|
179
180
|
meta=macro.meta,
|
180
|
-
docs=macro.docs,
|
181
|
+
docs=macro.docs.model_dump() if macro.docs else None,
|
181
182
|
patch_path=macro.patch_path,
|
182
|
-
arguments=[AltimateMacroArgument(**arg.
|
183
|
+
arguments=[AltimateMacroArgument(**arg.model_dump()) for arg in macro.arguments] if macro.arguments else None,
|
183
184
|
created_at=macro.created_at,
|
184
185
|
supported_languages=macro.supported_languages,
|
185
186
|
)
|
@@ -194,13 +195,13 @@ class ManifestV12Wrapper(BaseManifestWrapper):
|
|
194
195
|
unique_id=exposure.unique_id,
|
195
196
|
fqn=exposure.fqn,
|
196
197
|
type=AltimateExposureType(exposure.type.value) if exposure.type else None,
|
197
|
-
owner=AltimateOwner(**exposure.owner.
|
198
|
+
owner=AltimateOwner(**exposure.owner.model_dump()) if exposure.owner else None,
|
198
199
|
description=exposure.description,
|
199
200
|
label=exposure.label,
|
200
201
|
maturity=AltimateMaturityEnum(exposure.maturity.value) if exposure.maturity else None,
|
201
202
|
meta=exposure.meta,
|
202
203
|
tags=exposure.tags,
|
203
|
-
config=AltimateSourceConfig(**exposure.config.
|
204
|
+
config=AltimateSourceConfig(**exposure.config.model_dump()) if exposure.config else None,
|
204
205
|
unrendered_config=exposure.unrendered_config,
|
205
206
|
url=exposure.url,
|
206
207
|
depends_on=(
|
@@ -211,7 +212,7 @@ class ManifestV12Wrapper(BaseManifestWrapper):
|
|
211
212
|
if exposure.depends_on
|
212
213
|
else None
|
213
214
|
),
|
214
|
-
refs=[AltimateRefArgs(**ref.
|
215
|
+
refs=[AltimateRefArgs(**ref.model_dump()) for ref in exposure.refs] if exposure.refs else None,
|
215
216
|
sources=exposure.sources,
|
216
217
|
metrics=exposure.metrics,
|
217
218
|
created_at=exposure.created_at,
|
@@ -219,10 +220,10 @@ class ManifestV12Wrapper(BaseManifestWrapper):
|
|
219
220
|
|
220
221
|
def _get_tests(self, test: TestNode) -> AltimateManifestTestNode:
|
221
222
|
test_metadata = None
|
222
|
-
if isinstance(test,
|
223
|
+
if isinstance(test, Nodes6):
|
223
224
|
test_type = GENERIC
|
224
|
-
test_metadata = AltimateTestMetadata(**test.test_metadata.
|
225
|
-
elif isinstance(test,
|
225
|
+
test_metadata = AltimateTestMetadata(**test.test_metadata.model_dump()) if test.test_metadata else None
|
226
|
+
elif isinstance(test, Nodes2):
|
226
227
|
test_type = SINGULAR
|
227
228
|
else:
|
228
229
|
test_type = OTHER_TEST_NODE
|
@@ -245,7 +246,7 @@ class ManifestV12Wrapper(BaseManifestWrapper):
|
|
245
246
|
if test.checksum
|
246
247
|
else None
|
247
248
|
),
|
248
|
-
config=AltimateTestConfig(**test.config.
|
249
|
+
config=AltimateTestConfig(**test.config.model_dump()) if test.config else None,
|
249
250
|
description=test.description,
|
250
251
|
tags=test.tags,
|
251
252
|
columns=(
|
@@ -268,7 +269,7 @@ class ManifestV12Wrapper(BaseManifestWrapper):
|
|
268
269
|
group=test.group,
|
269
270
|
raw_code=test.raw_code,
|
270
271
|
language=test.language,
|
271
|
-
refs=[AltimateRefArgs(**ref.
|
272
|
+
refs=[AltimateRefArgs(**ref.model_dump()) for ref in test.refs] if test.refs else None,
|
272
273
|
sources=test.sources,
|
273
274
|
metrics=test.metrics,
|
274
275
|
depends_on=(
|
@@ -304,7 +305,7 @@ class ManifestV12Wrapper(BaseManifestWrapper):
|
|
304
305
|
if seed.checksum
|
305
306
|
else None
|
306
307
|
),
|
307
|
-
config=AltimateSeedConfig(**seed.config.
|
308
|
+
config=AltimateSeedConfig(**seed.config.model_dump()) if seed.config else None,
|
308
309
|
description=seed.description,
|
309
310
|
tags=seed.tags,
|
310
311
|
columns=(
|
@@ -324,7 +325,7 @@ class ManifestV12Wrapper(BaseManifestWrapper):
|
|
324
325
|
),
|
325
326
|
meta=seed.meta,
|
326
327
|
group=seed.group,
|
327
|
-
docs=seed.docs.
|
328
|
+
docs=seed.docs.model_dump() if seed.docs else None,
|
328
329
|
patch_path=seed.patch_path,
|
329
330
|
build_path=seed.build_path,
|
330
331
|
deferred=False,
|
@@ -375,7 +376,7 @@ class ManifestV12Wrapper(BaseManifestWrapper):
|
|
375
376
|
def get_tests(self, type=None) -> Dict[str, AltimateManifestTestNode]:
|
376
377
|
tests = {}
|
377
378
|
# Initialize types_union with TestNode
|
378
|
-
types = [
|
379
|
+
types = [Nodes2, Nodes6]
|
379
380
|
|
380
381
|
# Add other types to the union if provided
|
381
382
|
if type:
|
{altimate_datapilot_cli-0.0.14.dist-info → altimate_datapilot_cli-0.0.15.dist-info}/AUTHORS.rst
RENAMED
File without changes
|
File without changes
|
File without changes
|
{altimate_datapilot_cli-0.0.14.dist-info → altimate_datapilot_cli-0.0.15.dist-info}/entry_points.txt
RENAMED
File without changes
|
{altimate_datapilot_cli-0.0.14.dist-info → altimate_datapilot_cli-0.0.15.dist-info}/top_level.txt
RENAMED
File without changes
|