altimate-datapilot-cli 0.0.14__py3-none-any.whl → 0.0.16__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.16.dist-info}/METADATA +7 -7
- {altimate_datapilot_cli-0.0.14.dist-info → altimate_datapilot_cli-0.0.16.dist-info}/RECORD +19 -19
- datapilot/__init__.py +1 -1
- 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 +0 -19
- datapilot/core/platforms/dbt/schemas/manifest.py +2 -39
- 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.16.dist-info}/AUTHORS.rst +0 -0
- {altimate_datapilot_cli-0.0.14.dist-info → altimate_datapilot_cli-0.0.16.dist-info}/LICENSE +0 -0
- {altimate_datapilot_cli-0.0.14.dist-info → altimate_datapilot_cli-0.0.16.dist-info}/WHEEL +0 -0
- {altimate_datapilot_cli-0.0.14.dist-info → altimate_datapilot_cli-0.0.16.dist-info}/entry_points.txt +0 -0
- {altimate_datapilot_cli-0.0.14.dist-info → altimate_datapilot_cli-0.0.16.dist-info}/top_level.txt +0 -0
{altimate_datapilot_cli-0.0.14.dist-info → altimate_datapilot_cli-0.0.16.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.16
|
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,4 +1,4 @@
|
|
1
|
-
datapilot/__init__.py,sha256=
|
1
|
+
datapilot/__init__.py,sha256=8ss7zPyQ3YfaQJw9IIGX35NOL7ASZ7-LErAxKnQDN7c,23
|
2
2
|
datapilot/__main__.py,sha256=I9USmeNnK-cAHb6LZfydJC0LeNSE8enieeY55wpR6uw,380
|
3
3
|
datapilot/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
datapilot/cli/main.py,sha256=VSdqlkCiu8GSG9qQh8q0BzyocsQc4lKWxZAPEsjXF18,181
|
@@ -44,8 +44,8 @@ datapilot/core/platforms/dbt/insights/checks/check_column_name_contract.py,sha25
|
|
44
44
|
datapilot/core/platforms/dbt/insights/checks/check_macro_args_have_desc.py,sha256=Px-gBR0dx9z-xLOcp2ctDuKMRKK4ai554woMpeBFGFs,3185
|
45
45
|
datapilot/core/platforms/dbt/insights/checks/check_macro_has_desc.py,sha256=UrMYyZpi97gIBvH7leu5z27BowaFfPl0tOI4dqMSJmQ,2802
|
46
46
|
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=
|
47
|
+
datapilot/core/platforms/dbt/insights/checks/check_model_has_labels_keys.py,sha256=-cxWasRTJbZBhCd4JtTeygEJ90-m7v1YyhUzn0Jdjmw,5189
|
48
|
+
datapilot/core/platforms/dbt/insights/checks/check_model_has_meta_keys.py,sha256=QClFNsYlxy8nvmf8LyJENk8kT624Cas9l78qSXjs868,5009
|
49
49
|
datapilot/core/platforms/dbt/insights/checks/check_model_has_properties_file.py,sha256=hyl51rqSGmbj5DINtL5Dvex80SGSmN2o-qf_U6eaNMg,2968
|
50
50
|
datapilot/core/platforms/dbt/insights/checks/check_model_has_tests_by_group.py,sha256=d2Csu6EAapFx6eIXuCaCdNllbsjIBVab5QmlIv-SqGM,5706
|
51
51
|
datapilot/core/platforms/dbt/insights/checks/check_model_has_tests_by_name.py,sha256=bu87eQ5yZYZHtmdMEoIUA1Ynv8Tw3UGwCYKB_1_AXDI,5187
|
@@ -59,10 +59,10 @@ datapilot/core/platforms/dbt/insights/checks/check_model_tags.py,sha256=-268fA2k
|
|
59
59
|
datapilot/core/platforms/dbt/insights/checks/check_source_childs.py,sha256=L8W66Hauwjg98OCE3NFfTzXIbmT0XehD2TysiaPe-Eo,4254
|
60
60
|
datapilot/core/platforms/dbt/insights/checks/check_source_columns_have_desc.py,sha256=UzohMY6PGH_d-VCVJxvAbDI_DqeQqukmCpKU9W9fk_g,4453
|
61
61
|
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=
|
62
|
+
datapilot/core/platforms/dbt/insights/checks/check_source_has_freshness.py,sha256=1KP6g_-98hyjs3dTibFJFgBm97x_hJCeIYHdUR2HKDs,4117
|
63
|
+
datapilot/core/platforms/dbt/insights/checks/check_source_has_labels_keys.py,sha256=UMEd2inyjQMNk7scnn196yoPtQYfOynS4nVGoyGpsqc,5262
|
64
64
|
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=
|
65
|
+
datapilot/core/platforms/dbt/insights/checks/check_source_has_meta_keys.py,sha256=e4RNkMgGLRxOzqidMRZWKQgDdlFlB7LhHpoWlB5cJrQ,5239
|
66
66
|
datapilot/core/platforms/dbt/insights/checks/check_source_has_tests.py,sha256=M7WWX1ud49FnInS_htvmNa_8gIjVuhk9tIuq7Q-4P5E,3711
|
67
67
|
datapilot/core/platforms/dbt/insights/checks/check_source_has_tests_by_group.py,sha256=tvflQTxgdejTecDBspD6PdLLDHIWXY-_4uOzPWWqh2w,5550
|
68
68
|
datapilot/core/platforms/dbt/insights/checks/check_source_has_tests_by_name.py,sha256=wDNYB0ZGx_hV8DxXewR1TtZ_HnozZN1Dyk0YOlGUoEs,5159
|
@@ -109,8 +109,8 @@ datapilot/core/platforms/dbt/insights/structure/model_naming_conventions.py,sha2
|
|
109
109
|
datapilot/core/platforms/dbt/insights/structure/source_directories_structure.py,sha256=K-xTjYltuzcHH51s6PbFYcrnqpSCYluTbrzW1JT_vIU,3675
|
110
110
|
datapilot/core/platforms/dbt/insights/structure/test_directory_structure.py,sha256=XL6YQgWmf397W2OwBmT7L8zUN93M1bOZBTp4PlngqlI,3484
|
111
111
|
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=
|
112
|
+
datapilot/core/platforms/dbt/schemas/catalog.py,sha256=ZM8LNWmiOyOdkc797NpiceSaYEL47gd6k3lNajz79c8,1556
|
113
|
+
datapilot/core/platforms/dbt/schemas/manifest.py,sha256=vKBRai03D2JdzcO9x2e4aktbH2uIukEXh8lihU14yV4,13543
|
114
114
|
datapilot/core/platforms/dbt/wrappers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
115
115
|
datapilot/core/platforms/dbt/wrappers/catalog/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
116
116
|
datapilot/core/platforms/dbt/wrappers/catalog/wrapper.py,sha256=LDjt4pSiqGAmvI5DSPzEubwq13N1MKv9xakLNhG-BWY,196
|
@@ -120,13 +120,13 @@ datapilot/core/platforms/dbt/wrappers/manifest/__init__.py,sha256=47DEQpj8HBSa-_
|
|
120
120
|
datapilot/core/platforms/dbt/wrappers/manifest/wrapper.py,sha256=Q9DG-OEyJAa4ePoVhxG78pehfNotNc9A3xtz171fLhU,1189
|
121
121
|
datapilot/core/platforms/dbt/wrappers/manifest/v10/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
122
122
|
datapilot/core/platforms/dbt/wrappers/manifest/v10/schemas.py,sha256=VxqIFQbAL88ObQW1E8wPpiuooCdawdACJUFhgAYBxmo,1523
|
123
|
-
datapilot/core/platforms/dbt/wrappers/manifest/v10/wrapper.py,sha256=
|
123
|
+
datapilot/core/platforms/dbt/wrappers/manifest/v10/wrapper.py,sha256=jXF_HDoBMR5r7IPNcL3YGAvY0ZEFpTmda0uNiElbJbY,18057
|
124
124
|
datapilot/core/platforms/dbt/wrappers/manifest/v11/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
125
125
|
datapilot/core/platforms/dbt/wrappers/manifest/v11/schemas.py,sha256=Mb0N48czcwQTz5mxQx2QlVINzz50A5FUm0kMJ-Nzs6A,1523
|
126
|
-
datapilot/core/platforms/dbt/wrappers/manifest/v11/wrapper.py,sha256=
|
126
|
+
datapilot/core/platforms/dbt/wrappers/manifest/v11/wrapper.py,sha256=vuGFupQHyAJokWkgdzXmZd67S04nRkH89fEYCXeJWa0,17991
|
127
127
|
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=
|
128
|
+
datapilot/core/platforms/dbt/wrappers/manifest/v12/schemas.py,sha256=2rMEQ_BCcjiibfrlDKwgCE8vFX_6BzSInpilpVTWrNE,1269
|
129
|
+
datapilot/core/platforms/dbt/wrappers/manifest/v12/wrapper.py,sha256=lAQY7rAI2luQep4sPogi1swVzcAZ_z5VzGwIl2XpKe0,17926
|
130
130
|
datapilot/core/platforms/dbt/wrappers/run_results/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
131
131
|
datapilot/core/platforms/dbt/wrappers/run_results/run_results.py,sha256=3E_y1gAF491WmXt-Z_Fqhr5BU-kVnzjHpZZv5UpOx-s,1267
|
132
132
|
datapilot/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -139,10 +139,10 @@ datapilot/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
139
139
|
datapilot/utils/utils.py,sha256=MY8q6ZBJ0hkrTuH7gWMxAlEAQGrajXFMabEhtGtT7sc,11524
|
140
140
|
datapilot/utils/formatting/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
141
141
|
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.
|
142
|
+
altimate_datapilot_cli-0.0.16.dist-info/AUTHORS.rst,sha256=S4H4zw_v3GVyz5_55jF5Gf_YNG3s5Y0VgbQaEov9PFk,50
|
143
|
+
altimate_datapilot_cli-0.0.16.dist-info/LICENSE,sha256=Mf7VqpsmU2QR5_s2Cb_ZeeMB2Q9KW7YXJENZPFZRK1k,1100
|
144
|
+
altimate_datapilot_cli-0.0.16.dist-info/METADATA,sha256=u9VMpTgcYnEQPTfpKgk7ossYVldRkUDPU4y42rg-YDM,2382
|
145
|
+
altimate_datapilot_cli-0.0.16.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
146
|
+
altimate_datapilot_cli-0.0.16.dist-info/entry_points.txt,sha256=0zwgKxN40RLVB5jSmlJz7IH_FBqRtpFdbrdZn-xuQIY,141
|
147
|
+
altimate_datapilot_cli-0.0.16.dist-info/top_level.txt,sha256=gAOFOdwB00vcxv74y4M1J-nQtPvEatU8-mYViEBcToo,10
|
148
|
+
altimate_datapilot_cli-0.0.16.dist-info/RECORD,,
|
datapilot/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "0.0.
|
1
|
+
__version__ = "0.0.16"
|
@@ -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,14 +5,10 @@ from typing import List
|
|
5
5
|
from typing import Optional
|
6
6
|
from typing import Union
|
7
7
|
|
8
|
-
from pydantic.config import Extra
|
9
8
|
from pydantic.main import BaseModel
|
10
9
|
|
11
10
|
|
12
11
|
class AltimateCatalogMetadata(BaseModel):
|
13
|
-
class Config:
|
14
|
-
extra = Extra.forbid
|
15
|
-
|
16
12
|
dbt_schema_version: Optional[str] = "https://schemas.getdbt.com/dbt/catalog/v1.json"
|
17
13
|
dbt_version: Optional[str] = "0.19.0"
|
18
14
|
generated_at: Optional[datetime] = "2021-02-10T04:42:33.680487Z"
|
@@ -21,9 +17,6 @@ class AltimateCatalogMetadata(BaseModel):
|
|
21
17
|
|
22
18
|
|
23
19
|
class AltimateCatalogTableMetadata(BaseModel):
|
24
|
-
class Config:
|
25
|
-
extra = Extra.forbid
|
26
|
-
|
27
20
|
type: str
|
28
21
|
database: Optional[Optional[str]] = None
|
29
22
|
schema_name: str
|
@@ -33,9 +26,6 @@ class AltimateCatalogTableMetadata(BaseModel):
|
|
33
26
|
|
34
27
|
|
35
28
|
class AltimateCatalogColumnMetadata(BaseModel):
|
36
|
-
class Config:
|
37
|
-
extra = Extra.forbid
|
38
|
-
|
39
29
|
type: str
|
40
30
|
comment: Optional[Optional[str]] = None
|
41
31
|
index: int
|
@@ -43,9 +33,6 @@ class AltimateCatalogColumnMetadata(BaseModel):
|
|
43
33
|
|
44
34
|
|
45
35
|
class AltimateCatalogStatsItem(BaseModel):
|
46
|
-
class Config:
|
47
|
-
extra = Extra.forbid
|
48
|
-
|
49
36
|
id: str
|
50
37
|
label: str
|
51
38
|
value: Optional[Optional[Union[bool, str, float]]] = None
|
@@ -54,9 +41,6 @@ class AltimateCatalogStatsItem(BaseModel):
|
|
54
41
|
|
55
42
|
|
56
43
|
class AltimateCatalogTable(BaseModel):
|
57
|
-
class Config:
|
58
|
-
extra = Extra.forbid
|
59
|
-
|
60
44
|
metadata: AltimateCatalogTableMetadata
|
61
45
|
columns: Dict[str, AltimateCatalogColumnMetadata]
|
62
46
|
stats: Dict[str, AltimateCatalogStatsItem]
|
@@ -64,9 +48,6 @@ class AltimateCatalogTable(BaseModel):
|
|
64
48
|
|
65
49
|
|
66
50
|
class AltimateCatalogCatalogV1(BaseModel):
|
67
|
-
class Config:
|
68
|
-
extra = Extra.forbid
|
69
|
-
|
70
51
|
metadata: AltimateCatalogMetadata
|
71
52
|
nodes: Dict[str, AltimateCatalogTable]
|
72
53
|
sources: Dict[str, AltimateCatalogTable]
|
@@ -19,7 +19,6 @@ 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 Extra
|
23
22
|
|
24
23
|
|
25
24
|
class DBTVersion(BaseModel):
|
@@ -46,16 +45,13 @@ Catalog = CatalogV1
|
|
46
45
|
|
47
46
|
|
48
47
|
class AltimateDocs(BaseModel):
|
49
|
-
class Config:
|
50
|
-
extra = Extra.forbid
|
51
|
-
|
52
48
|
show: Optional[bool] = True
|
53
49
|
node_color: Optional[Optional[str]] = None
|
54
50
|
|
55
51
|
|
56
52
|
class AltimateDependsOn(BaseModel):
|
57
|
-
nodes: Optional[List[str]]
|
58
|
-
macros: Optional[List[str]]
|
53
|
+
nodes: Optional[List[str]] = None
|
54
|
+
macros: Optional[List[str]] = None
|
59
55
|
|
60
56
|
|
61
57
|
class AltimateManifestColumnInfo(BaseModel):
|
@@ -98,18 +94,12 @@ class AltimateAccess(Enum):
|
|
98
94
|
|
99
95
|
|
100
96
|
class AltimateDBTContract(BaseModel):
|
101
|
-
class Config:
|
102
|
-
extra = Extra.forbid
|
103
|
-
|
104
97
|
enforced: Optional[bool] = False
|
105
98
|
alias_types: Optional[bool] = True
|
106
99
|
checksum: Optional[Optional[str]] = None
|
107
100
|
|
108
101
|
|
109
102
|
class AltimateHook(BaseModel):
|
110
|
-
class Config:
|
111
|
-
extra = Extra.forbid
|
112
|
-
|
113
103
|
sql: str
|
114
104
|
transaction: Optional[bool] = True
|
115
105
|
index: Optional[Optional[int]] = None
|
@@ -117,9 +107,6 @@ class AltimateHook(BaseModel):
|
|
117
107
|
|
118
108
|
# TODO: Need to add the rest of the fields
|
119
109
|
class AltimateNodeConfig(BaseModel):
|
120
|
-
class Config:
|
121
|
-
extra = Extra.allow
|
122
|
-
|
123
110
|
_extra: Optional[Dict[str, Any]] = None
|
124
111
|
enabled: Optional[bool] = True
|
125
112
|
alias: Optional[Optional[str]] = None
|
@@ -203,9 +190,6 @@ class AltimateSourceConfig(BaseModel):
|
|
203
190
|
|
204
191
|
|
205
192
|
class AltimateDeferRelation(BaseModel):
|
206
|
-
class Config:
|
207
|
-
extra = Extra.forbid
|
208
|
-
|
209
193
|
database: Optional[str]
|
210
194
|
schema_name: str
|
211
195
|
alias: str
|
@@ -213,9 +197,6 @@ class AltimateDeferRelation(BaseModel):
|
|
213
197
|
|
214
198
|
|
215
199
|
class AltimateSeedConfig(BaseModel):
|
216
|
-
class Config:
|
217
|
-
extra = Extra.allow
|
218
|
-
|
219
200
|
_extra: Optional[Dict[str, Any]] = None
|
220
201
|
enabled: Optional[bool] = True
|
221
202
|
alias: Optional[Optional[str]] = None
|
@@ -314,9 +295,6 @@ class AltimateExposureType(Enum):
|
|
314
295
|
|
315
296
|
|
316
297
|
class AltimateOwner(BaseModel):
|
317
|
-
class Config:
|
318
|
-
extra = Extra.allow
|
319
|
-
|
320
298
|
_extra: Optional[Dict[str, Any]] = None
|
321
299
|
email: Optional[Optional[str]] = None
|
322
300
|
name: Optional[Optional[str]] = None
|
@@ -329,18 +307,12 @@ class AltimateMaturityEnum(Enum):
|
|
329
307
|
|
330
308
|
|
331
309
|
class AltimateRefArgs(BaseModel):
|
332
|
-
class Config:
|
333
|
-
extra = Extra.forbid
|
334
|
-
|
335
310
|
name: str
|
336
311
|
package: Optional[Optional[str]] = None
|
337
312
|
version: Optional[Optional[Union[str, float]]] = None
|
338
313
|
|
339
314
|
|
340
315
|
class AltimateExposureConfig(BaseModel):
|
341
|
-
class Config:
|
342
|
-
extra = Extra.allow
|
343
|
-
|
344
316
|
_extra: Optional[Dict[str, Any]] = None
|
345
317
|
enabled: Optional[bool] = True
|
346
318
|
|
@@ -371,18 +343,12 @@ class AltimateManifestExposureNode(BaseModel):
|
|
371
343
|
|
372
344
|
|
373
345
|
class AltimateTestMetadata(BaseModel):
|
374
|
-
class Config:
|
375
|
-
extra = Extra.forbid
|
376
|
-
|
377
346
|
name: str
|
378
347
|
kwargs: Optional[Dict[str, Any]] = None
|
379
348
|
namespace: Optional[Optional[str]] = None
|
380
349
|
|
381
350
|
|
382
351
|
class AltimateTestConfig(BaseModel):
|
383
|
-
class Config:
|
384
|
-
extra = Extra.allow
|
385
|
-
|
386
352
|
_extra: Optional[Dict[str, Any]] = None
|
387
353
|
enabled: Optional[bool] = True
|
388
354
|
alias: Optional[Optional[str]] = None
|
@@ -433,9 +399,6 @@ class AltimateManifestTestNode(BaseModel):
|
|
433
399
|
|
434
400
|
|
435
401
|
class AltimateMacroArgument(BaseModel):
|
436
|
-
class Config:
|
437
|
-
extra = Extra.forbid
|
438
|
-
|
439
402
|
name: str
|
440
403
|
type: Optional[Optional[str]] = None
|
441
404
|
description: Optional[Optional[str]] = ""
|
@@ -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.16.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.16.dist-info}/entry_points.txt
RENAMED
File without changes
|
{altimate_datapilot_cli-0.0.14.dist-info → altimate_datapilot_cli-0.0.16.dist-info}/top_level.txt
RENAMED
File without changes
|