cognite-toolkit 0.7.72__py3-none-any.whl → 0.7.73__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.
- cognite_toolkit/_cdf_tk/builders/_raw.py +2 -2
- cognite_toolkit/_cdf_tk/client/api/raw.py +47 -27
- cognite_toolkit/_cdf_tk/client/http_client/_data_classes.py +1 -0
- cognite_toolkit/_cdf_tk/client/http_client/_exception.py +6 -1
- cognite_toolkit/_cdf_tk/client/resource_classes/identifiers.py +26 -1
- cognite_toolkit/_cdf_tk/client/resource_classes/raw.py +70 -16
- cognite_toolkit/_cdf_tk/client/testing.py +9 -3
- cognite_toolkit/_cdf_tk/commands/build_cmd.py +2 -2
- cognite_toolkit/_cdf_tk/cruds/_data_cruds.py +3 -3
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/auth.py +4 -5
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/extraction_pipeline.py +3 -3
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/raw.py +99 -91
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/transformation.py +3 -3
- cognite_toolkit/_repo_files/GitHub/.github/workflows/deploy.yaml +1 -1
- cognite_toolkit/_repo_files/GitHub/.github/workflows/dry-run.yaml +1 -1
- cognite_toolkit/_resources/cdf.toml +1 -1
- cognite_toolkit/_version.py +1 -1
- {cognite_toolkit-0.7.72.dist-info → cognite_toolkit-0.7.73.dist-info}/METADATA +1 -1
- {cognite_toolkit-0.7.72.dist-info → cognite_toolkit-0.7.73.dist-info}/RECORD +21 -21
- {cognite_toolkit-0.7.72.dist-info → cognite_toolkit-0.7.73.dist-info}/WHEEL +0 -0
- {cognite_toolkit-0.7.72.dist-info → cognite_toolkit-0.7.73.dist-info}/entry_points.txt +0 -0
|
@@ -3,7 +3,7 @@ from collections.abc import Callable, Iterable, Sequence
|
|
|
3
3
|
from typing import Any
|
|
4
4
|
|
|
5
5
|
from cognite_toolkit._cdf_tk.builders import Builder
|
|
6
|
-
from cognite_toolkit._cdf_tk.client.resource_classes.
|
|
6
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.identifiers import RawDatabaseId
|
|
7
7
|
from cognite_toolkit._cdf_tk.cruds import RawDatabaseCRUD, RawTableCRUD, ResourceCRUD
|
|
8
8
|
from cognite_toolkit._cdf_tk.data_classes import (
|
|
9
9
|
BuildDestinationFile,
|
|
@@ -40,7 +40,7 @@ class RawBuilder(Builder):
|
|
|
40
40
|
entry_by_loader[RawDatabaseCRUD].append(item)
|
|
41
41
|
else:
|
|
42
42
|
entry_by_loader[RawTableCRUD].append(item)
|
|
43
|
-
db_item = RawDatabaseCRUD.dump_id(
|
|
43
|
+
db_item = RawDatabaseCRUD.dump_id(RawDatabaseId(name=table_id.db_name))
|
|
44
44
|
hashable_db_item = tuple(db_item.items())
|
|
45
45
|
if hashable_db_item not in seen_databases:
|
|
46
46
|
seen_databases.add(hashable_db_item)
|
|
@@ -2,10 +2,16 @@ from collections.abc import Iterable, Sequence
|
|
|
2
2
|
|
|
3
3
|
from cognite_toolkit._cdf_tk.client.cdf_client import CDFResourceAPI, Endpoint, PagedResponse, ResponseItems
|
|
4
4
|
from cognite_toolkit._cdf_tk.client.http_client import HTTPClient, ItemsSuccessResponse, SuccessResponse
|
|
5
|
-
from cognite_toolkit._cdf_tk.client.resource_classes.
|
|
5
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.identifiers import RawDatabaseId, RawTableId
|
|
6
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.raw import (
|
|
7
|
+
RAWDatabaseRequest,
|
|
8
|
+
RAWDatabaseResponse,
|
|
9
|
+
RAWTableRequest,
|
|
10
|
+
RAWTableResponse,
|
|
11
|
+
)
|
|
6
12
|
|
|
7
13
|
|
|
8
|
-
class RawDatabasesAPI(CDFResourceAPI[
|
|
14
|
+
class RawDatabasesAPI(CDFResourceAPI[RawDatabaseId, RAWDatabaseRequest, RAWDatabaseResponse]):
|
|
9
15
|
"""API for managing RAW databases in CDF.
|
|
10
16
|
|
|
11
17
|
This API provides methods to create, list, and delete RAW databases.
|
|
@@ -21,13 +27,15 @@ class RawDatabasesAPI(CDFResourceAPI[RAWDatabase, RAWDatabase, RAWDatabase]):
|
|
|
21
27
|
},
|
|
22
28
|
)
|
|
23
29
|
|
|
24
|
-
def _validate_page_response(
|
|
25
|
-
|
|
30
|
+
def _validate_page_response(
|
|
31
|
+
self, response: SuccessResponse | ItemsSuccessResponse
|
|
32
|
+
) -> PagedResponse[RAWDatabaseResponse]:
|
|
33
|
+
return PagedResponse[RAWDatabaseResponse].model_validate_json(response.body)
|
|
26
34
|
|
|
27
|
-
def _reference_response(self, response: SuccessResponse) -> ResponseItems[
|
|
28
|
-
return ResponseItems[
|
|
35
|
+
def _reference_response(self, response: SuccessResponse) -> ResponseItems[RAWDatabaseResponse]:
|
|
36
|
+
return ResponseItems[RAWDatabaseResponse].model_validate_json(response.body)
|
|
29
37
|
|
|
30
|
-
def create(self, items: Sequence[
|
|
38
|
+
def create(self, items: Sequence[RAWDatabaseRequest]) -> list[RAWDatabaseResponse]:
|
|
31
39
|
"""Create databases in CDF.
|
|
32
40
|
|
|
33
41
|
Args:
|
|
@@ -38,20 +46,20 @@ class RawDatabasesAPI(CDFResourceAPI[RAWDatabase, RAWDatabase, RAWDatabase]):
|
|
|
38
46
|
"""
|
|
39
47
|
return self._request_item_response(list(items), "create")
|
|
40
48
|
|
|
41
|
-
def delete(self, items: Sequence[
|
|
49
|
+
def delete(self, items: Sequence[RawDatabaseId], recursive: bool = False) -> None:
|
|
42
50
|
"""Delete databases from CDF.
|
|
43
51
|
|
|
44
52
|
Args:
|
|
45
53
|
items: List of RAWDatabase objects to delete.
|
|
46
54
|
recursive: Whether to delete tables within the database recursively.
|
|
47
55
|
"""
|
|
48
|
-
self._request_no_response(
|
|
56
|
+
self._request_no_response(items, "delete", extra_body={"recursive": recursive})
|
|
49
57
|
|
|
50
58
|
def paginate(
|
|
51
59
|
self,
|
|
52
60
|
limit: int = 100,
|
|
53
61
|
cursor: str | None = None,
|
|
54
|
-
) -> PagedResponse[
|
|
62
|
+
) -> PagedResponse[RAWDatabaseResponse]:
|
|
55
63
|
"""Iterate over all databases in CDF.
|
|
56
64
|
|
|
57
65
|
Args:
|
|
@@ -66,7 +74,7 @@ class RawDatabasesAPI(CDFResourceAPI[RAWDatabase, RAWDatabase, RAWDatabase]):
|
|
|
66
74
|
def iterate(
|
|
67
75
|
self,
|
|
68
76
|
limit: int = 100,
|
|
69
|
-
) -> Iterable[list[
|
|
77
|
+
) -> Iterable[list[RAWDatabaseResponse]]:
|
|
70
78
|
"""Iterate over all databases in CDF.
|
|
71
79
|
|
|
72
80
|
Args:
|
|
@@ -77,7 +85,7 @@ class RawDatabasesAPI(CDFResourceAPI[RAWDatabase, RAWDatabase, RAWDatabase]):
|
|
|
77
85
|
"""
|
|
78
86
|
return self._iterate(limit=limit)
|
|
79
87
|
|
|
80
|
-
def list(self, limit: int | None = None) -> list[
|
|
88
|
+
def list(self, limit: int | None = None) -> list[RAWDatabaseResponse]:
|
|
81
89
|
"""List all databases in CDF.
|
|
82
90
|
|
|
83
91
|
Args:
|
|
@@ -89,7 +97,7 @@ class RawDatabasesAPI(CDFResourceAPI[RAWDatabase, RAWDatabase, RAWDatabase]):
|
|
|
89
97
|
return self._list(limit=limit)
|
|
90
98
|
|
|
91
99
|
|
|
92
|
-
class RawTablesAPI(CDFResourceAPI[
|
|
100
|
+
class RawTablesAPI(CDFResourceAPI[RawTableId, RAWTableRequest, RAWTableResponse]):
|
|
93
101
|
"""API for managing RAW tables in CDF.
|
|
94
102
|
|
|
95
103
|
This API provides methods to create, list, and delete RAW tables within a database.
|
|
@@ -109,15 +117,17 @@ class RawTablesAPI(CDFResourceAPI[RAWTable, RAWTable, RAWTable]):
|
|
|
109
117
|
},
|
|
110
118
|
)
|
|
111
119
|
|
|
112
|
-
def _validate_page_response(
|
|
120
|
+
def _validate_page_response(
|
|
121
|
+
self, response: SuccessResponse | ItemsSuccessResponse
|
|
122
|
+
) -> PagedResponse[RAWTableResponse]:
|
|
113
123
|
"""Parse a page response. Note: db_name must be injected separately."""
|
|
114
|
-
return PagedResponse[
|
|
124
|
+
return PagedResponse[RAWTableResponse].model_validate_json(response.body)
|
|
115
125
|
|
|
116
|
-
def _reference_response(self, response: SuccessResponse) -> ResponseItems[
|
|
126
|
+
def _reference_response(self, response: SuccessResponse) -> ResponseItems[RAWTableResponse]:
|
|
117
127
|
"""Parse a reference response. Note: db_name must be injected separately."""
|
|
118
|
-
return ResponseItems[
|
|
128
|
+
return ResponseItems[RAWTableResponse].model_validate_json(response.body)
|
|
119
129
|
|
|
120
|
-
def create(self, items: Sequence[
|
|
130
|
+
def create(self, items: Sequence[RAWTableRequest], ensure_parent: bool = False) -> list[RAWTableResponse]:
|
|
121
131
|
"""Create tables in a database in CDF.
|
|
122
132
|
|
|
123
133
|
Args:
|
|
@@ -127,7 +137,7 @@ class RawTablesAPI(CDFResourceAPI[RAWTable, RAWTable, RAWTable]):
|
|
|
127
137
|
Returns:
|
|
128
138
|
List of created RAWTable objects.
|
|
129
139
|
"""
|
|
130
|
-
result: list[
|
|
140
|
+
result: list[RAWTableResponse] = []
|
|
131
141
|
for (db_name,), group in self._group_items_by_text_field(items, "db_name").items():
|
|
132
142
|
if not db_name:
|
|
133
143
|
raise ValueError("db_name must be set on all RAWTable items for creation.")
|
|
@@ -136,10 +146,11 @@ class RawTablesAPI(CDFResourceAPI[RAWTable, RAWTable, RAWTable]):
|
|
|
136
146
|
group, "create", params={"ensureParent": ensure_parent}, endpoint=endpoint
|
|
137
147
|
)
|
|
138
148
|
for table in created:
|
|
139
|
-
|
|
149
|
+
table.db_name = db_name
|
|
150
|
+
result.append(table)
|
|
140
151
|
return result
|
|
141
152
|
|
|
142
|
-
def delete(self, items: Sequence[
|
|
153
|
+
def delete(self, items: Sequence[RawTableId]) -> None:
|
|
143
154
|
"""Delete tables from a database in CDF.
|
|
144
155
|
|
|
145
156
|
Args:
|
|
@@ -156,7 +167,7 @@ class RawTablesAPI(CDFResourceAPI[RAWTable, RAWTable, RAWTable]):
|
|
|
156
167
|
db_name: str,
|
|
157
168
|
limit: int = 100,
|
|
158
169
|
cursor: str | None = None,
|
|
159
|
-
) -> PagedResponse[
|
|
170
|
+
) -> PagedResponse[RAWTableResponse]:
|
|
160
171
|
"""Iterate over all tables in a database in CDF.
|
|
161
172
|
|
|
162
173
|
Args:
|
|
@@ -167,13 +178,16 @@ class RawTablesAPI(CDFResourceAPI[RAWTable, RAWTable, RAWTable]):
|
|
|
167
178
|
Returns:
|
|
168
179
|
PagedResponse of RAWTable objects.
|
|
169
180
|
"""
|
|
170
|
-
|
|
181
|
+
page = self._paginate(cursor=cursor, limit=limit, endpoint_path=f"/raw/dbs/{db_name}/tables")
|
|
182
|
+
for table in page.items:
|
|
183
|
+
table.db_name = db_name
|
|
184
|
+
return page
|
|
171
185
|
|
|
172
186
|
def iterate(
|
|
173
187
|
self,
|
|
174
188
|
db_name: str,
|
|
175
189
|
limit: int = 100,
|
|
176
|
-
) -> Iterable[list[
|
|
190
|
+
) -> Iterable[list[RAWTableResponse]]:
|
|
177
191
|
"""Iterate over all tables in a database in CDF.
|
|
178
192
|
|
|
179
193
|
Args:
|
|
@@ -183,9 +197,12 @@ class RawTablesAPI(CDFResourceAPI[RAWTable, RAWTable, RAWTable]):
|
|
|
183
197
|
Returns:
|
|
184
198
|
Iterable of lists of RAWTable objects.
|
|
185
199
|
"""
|
|
186
|
-
|
|
200
|
+
for table in self._iterate(limit=limit, endpoint_path=f"/raw/dbs/{db_name}/tables"):
|
|
201
|
+
for t in table:
|
|
202
|
+
t.db_name = db_name
|
|
203
|
+
yield table
|
|
187
204
|
|
|
188
|
-
def list(self, db_name: str, limit: int | None = None) -> list[
|
|
205
|
+
def list(self, db_name: str, limit: int | None = None) -> list[RAWTableResponse]:
|
|
189
206
|
"""List all tables in a database in CDF.
|
|
190
207
|
|
|
191
208
|
Args:
|
|
@@ -195,7 +212,10 @@ class RawTablesAPI(CDFResourceAPI[RAWTable, RAWTable, RAWTable]):
|
|
|
195
212
|
Returns:
|
|
196
213
|
List of RAWTable objects.
|
|
197
214
|
"""
|
|
198
|
-
|
|
215
|
+
listed = self._list(limit, endpoint_path=f"/raw/dbs/{db_name}/tables")
|
|
216
|
+
for table in listed:
|
|
217
|
+
table.db_name = db_name
|
|
218
|
+
return listed
|
|
199
219
|
|
|
200
220
|
|
|
201
221
|
class RawAPI:
|
|
@@ -23,6 +23,7 @@ class HTTPResult(BaseModel):
|
|
|
23
23
|
f"Request failed with status code {self.status_code}: {self.error.message}",
|
|
24
24
|
missing=self.error.missing, # type: ignore[arg-type]
|
|
25
25
|
duplicated=self.error.duplicated, # type: ignore[arg-type]
|
|
26
|
+
code=self.error.code,
|
|
26
27
|
)
|
|
27
28
|
elif isinstance(self, FailedRequest):
|
|
28
29
|
raise ToolkitAPIError(f"Request failed with error: {self.error}")
|
|
@@ -5,9 +5,14 @@ class ToolkitAPIError(Exception):
|
|
|
5
5
|
"""Base class for all exceptions raised by the Cognite Toolkit API client."""
|
|
6
6
|
|
|
7
7
|
def __init__(
|
|
8
|
-
self,
|
|
8
|
+
self,
|
|
9
|
+
message: str,
|
|
10
|
+
missing: list[dict[str, Any]] | None = None,
|
|
11
|
+
duplicated: list[dict[str, Any]] | None = None,
|
|
12
|
+
code: int | None = None,
|
|
9
13
|
) -> None:
|
|
10
14
|
super().__init__(message)
|
|
11
15
|
self.message = message
|
|
12
16
|
self.missing = missing
|
|
13
17
|
self.duplicated = duplicated
|
|
18
|
+
self.code = code
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from collections.abc import Sequence
|
|
2
2
|
from typing import Annotated, Any, Literal
|
|
3
3
|
|
|
4
|
-
from pydantic import Field, model_serializer, model_validator
|
|
4
|
+
from pydantic import AliasChoices, Field, model_serializer, model_validator
|
|
5
5
|
|
|
6
6
|
from cognite_toolkit._cdf_tk.client._resource_base import Identifier
|
|
7
7
|
|
|
@@ -65,6 +65,31 @@ class NameId(Identifier):
|
|
|
65
65
|
return f"name='{self.name}'"
|
|
66
66
|
|
|
67
67
|
|
|
68
|
+
class RawDatabaseId(Identifier):
|
|
69
|
+
name: str = Field(alias="name", validation_alias=AliasChoices("dbName", "name"))
|
|
70
|
+
|
|
71
|
+
def __str__(self) -> str:
|
|
72
|
+
return f"name='{self.name}'"
|
|
73
|
+
|
|
74
|
+
def dump(self, camel_case: bool = True, exclude_extra: bool = False) -> dict[str, Any]:
|
|
75
|
+
"""Dump the resource to a dictionary.
|
|
76
|
+
|
|
77
|
+
Args:
|
|
78
|
+
camel_case (bool): Will be ignored. Included for compatibility.
|
|
79
|
+
exclude_extra (bool): Will be ignored. Included for compatibility.
|
|
80
|
+
|
|
81
|
+
"""
|
|
82
|
+
return self.model_dump(mode="json", by_alias=False)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
class RawTableId(Identifier):
|
|
86
|
+
name: str
|
|
87
|
+
db_name: str
|
|
88
|
+
|
|
89
|
+
def __str__(self) -> str:
|
|
90
|
+
return f"dbName='{self.db_name}', name='{self.name}'"
|
|
91
|
+
|
|
92
|
+
|
|
68
93
|
class WorkflowVersionId(Identifier):
|
|
69
94
|
workflow_external_id: str
|
|
70
95
|
version: str
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import sys
|
|
2
|
+
from typing import Any
|
|
2
3
|
|
|
3
4
|
from pydantic import Field
|
|
4
5
|
|
|
5
6
|
from cognite_toolkit._cdf_tk.client._resource_base import (
|
|
6
|
-
Identifier,
|
|
7
7
|
RequestResource,
|
|
8
8
|
ResponseResource,
|
|
9
9
|
)
|
|
10
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.identifiers import RawDatabaseId, RawTableId
|
|
10
11
|
|
|
11
12
|
if sys.version_info >= (3, 11):
|
|
12
13
|
from typing import Self
|
|
@@ -14,31 +15,84 @@ else:
|
|
|
14
15
|
from typing_extensions import Self
|
|
15
16
|
|
|
16
17
|
|
|
17
|
-
class
|
|
18
|
+
class RAWDatabaseRequest(RequestResource):
|
|
19
|
+
name: str = Field(alias="dbName")
|
|
20
|
+
|
|
21
|
+
def as_id(self) -> RawDatabaseId:
|
|
22
|
+
return RawDatabaseId(name=self.name)
|
|
23
|
+
|
|
24
|
+
# Override dump to always use by_alias=False since the API expects name='...'
|
|
25
|
+
def dump(self, camel_case: bool = True, exclude_extra: bool = False) -> dict[str, Any]:
|
|
26
|
+
"""Dump the resource to a dictionary.
|
|
27
|
+
|
|
28
|
+
Args:
|
|
29
|
+
camel_case (bool): Whether to use camelCase for the keys. Default is True.
|
|
30
|
+
exclude_extra (bool): Whether to exclude extra fields not defined in the model. Default is False.
|
|
31
|
+
|
|
32
|
+
"""
|
|
33
|
+
if exclude_extra:
|
|
34
|
+
return self.model_dump(
|
|
35
|
+
mode="json",
|
|
36
|
+
by_alias=False,
|
|
37
|
+
exclude_unset=True,
|
|
38
|
+
exclude=set(self.__pydantic_extra__) if self.__pydantic_extra__ else None,
|
|
39
|
+
)
|
|
40
|
+
return self.model_dump(mode="json", by_alias=False, exclude_unset=True)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class RAWDatabaseResponse(ResponseResource[RAWDatabaseRequest]):
|
|
18
44
|
name: str
|
|
45
|
+
created_time: int
|
|
46
|
+
|
|
47
|
+
def as_request_resource(self) -> RAWDatabaseRequest:
|
|
48
|
+
return RAWDatabaseRequest.model_validate(self.dump(), extra="ignore")
|
|
19
49
|
|
|
20
|
-
def as_id(self) ->
|
|
21
|
-
return self
|
|
50
|
+
def as_id(self) -> RawDatabaseId:
|
|
51
|
+
return RawDatabaseId(name=self.name)
|
|
22
52
|
|
|
23
|
-
def __str__(self) -> str:
|
|
24
|
-
return f"name='{self.name}'"
|
|
25
53
|
|
|
26
|
-
|
|
27
|
-
|
|
54
|
+
class RAWTableRequest(RequestResource):
|
|
55
|
+
# This is a query parameter, so we exclude it from serialization.
|
|
56
|
+
db_name: str = Field(exclude=True)
|
|
57
|
+
name: str = Field(alias="tableName")
|
|
58
|
+
|
|
59
|
+
def as_id(self) -> RawTableId:
|
|
60
|
+
return RawTableId(db_name=self.db_name, name=self.name)
|
|
61
|
+
|
|
62
|
+
# Override dump to always use by_alias=False since the API expects name='...'
|
|
63
|
+
def dump(self, camel_case: bool = True, exclude_extra: bool = False) -> dict[str, Any]:
|
|
64
|
+
"""Dump the resource to a dictionary.
|
|
65
|
+
|
|
66
|
+
Args:
|
|
67
|
+
camel_case (bool): Whether to use camelCase for the keys. Default is True.
|
|
68
|
+
exclude_extra (bool): Whether to exclude extra fields not defined in the model. Default is False.
|
|
28
69
|
|
|
70
|
+
"""
|
|
71
|
+
if exclude_extra:
|
|
72
|
+
return self.model_dump(
|
|
73
|
+
mode="json",
|
|
74
|
+
by_alias=False,
|
|
75
|
+
exclude_unset=True,
|
|
76
|
+
exclude=set(self.__pydantic_extra__) if self.__pydantic_extra__ else None,
|
|
77
|
+
)
|
|
78
|
+
return self.model_dump(mode="json", by_alias=False, exclude_unset=True)
|
|
29
79
|
|
|
30
|
-
|
|
80
|
+
|
|
81
|
+
class RAWTableResponse(ResponseResource[RAWTableRequest]):
|
|
31
82
|
# This is a query parameter, so we exclude it from serialization.
|
|
32
83
|
# Default to empty string to allow parsing from API responses (which don't include db_name).
|
|
33
84
|
db_name: str = Field(default="", exclude=True)
|
|
34
85
|
name: str
|
|
86
|
+
created_time: int
|
|
35
87
|
|
|
36
|
-
def
|
|
37
|
-
|
|
88
|
+
def as_request_resource(self) -> RAWTableRequest:
|
|
89
|
+
dumped = {**self.dump(), "dbName": self.db_name}
|
|
90
|
+
return RAWTableRequest.model_validate(dumped, extra="ignore")
|
|
38
91
|
|
|
39
|
-
|
|
40
|
-
|
|
92
|
+
@classmethod
|
|
93
|
+
def _load(cls, resource: dict[str, Any]) -> Self:
|
|
94
|
+
"""Load method to match CogniteResource signature."""
|
|
95
|
+
return cls.model_validate(resource, by_name=True)
|
|
41
96
|
|
|
42
|
-
def
|
|
43
|
-
|
|
44
|
-
return type(self).model_validate(dumped, extra="ignore")
|
|
97
|
+
def as_id(self) -> RawTableId:
|
|
98
|
+
return RawTableId(db_name=self.db_name, name=self.name)
|
|
@@ -6,7 +6,9 @@ from unittest.mock import MagicMock
|
|
|
6
6
|
from cognite.client._api.datapoints import DatapointsAPI
|
|
7
7
|
from cognite.client._api.datapoints_subscriptions import DatapointsSubscriptionAPI
|
|
8
8
|
from cognite.client._api.functions import FunctionCallsAPI, FunctionSchedulesAPI
|
|
9
|
-
from cognite.client._api.raw import RawDatabasesAPI
|
|
9
|
+
from cognite.client._api.raw import RawDatabasesAPI as LegacyRawDatabasesAPI
|
|
10
|
+
from cognite.client._api.raw import RawRowsAPI
|
|
11
|
+
from cognite.client._api.raw import RawTablesAPI as LegacyRawTablesAPI
|
|
10
12
|
from cognite.client._api.simulators import SimulatorModelsAPI, SimulatorsAPI
|
|
11
13
|
from cognite.client._api.synthetic_time_series import SyntheticDatapointsAPI
|
|
12
14
|
from cognite.client.testing import CogniteClientMock
|
|
@@ -24,6 +26,7 @@ from cognite_toolkit._cdf_tk.client.api.legacy.extended_raw import ExtendedRawAP
|
|
|
24
26
|
from cognite_toolkit._cdf_tk.client.api.legacy.extended_timeseries import ExtendedTimeSeriesAPI
|
|
25
27
|
from cognite_toolkit._cdf_tk.client.api.legacy.location_filters import LocationFiltersAPI
|
|
26
28
|
from cognite_toolkit._cdf_tk.client.api.legacy.search_config import SearchConfigurationsAPI
|
|
29
|
+
from cognite_toolkit._cdf_tk.client.api.raw import RawAPI, RawDatabasesAPI, RawTablesAPI
|
|
27
30
|
from cognite_toolkit._cdf_tk.client.api.robotics import RoboticsAPI
|
|
28
31
|
from cognite_toolkit._cdf_tk.client.api.robotics_capabilities import CapabilitiesAPI
|
|
29
32
|
from cognite_toolkit._cdf_tk.client.api.robotics_data_postprocessing import DataPostProcessingAPI
|
|
@@ -134,9 +137,9 @@ class ToolkitClientMock(CogniteClientMock):
|
|
|
134
137
|
self.migration.resource_view_mapping = MagicMock(spec_set=ResourceViewMappingAPI)
|
|
135
138
|
self.migration.created_source_system = MagicMock(spec_set=CreatedSourceSystemAPI)
|
|
136
139
|
self.raw = MagicMock(spec=ExtendedRawAPI)
|
|
137
|
-
self.raw.databases = MagicMock(spec_set=
|
|
140
|
+
self.raw.databases = MagicMock(spec_set=LegacyRawDatabasesAPI)
|
|
138
141
|
self.raw.rows = MagicMock(spec_set=RawRowsAPI)
|
|
139
|
-
self.raw.tables = MagicMock(spec_set=
|
|
142
|
+
self.raw.tables = MagicMock(spec_set=LegacyRawTablesAPI)
|
|
140
143
|
|
|
141
144
|
self.data_modeling.instances = MagicMock(spec_set=ExtendedInstancesAPI)
|
|
142
145
|
|
|
@@ -162,6 +165,9 @@ class ToolkitClientMock(CogniteClientMock):
|
|
|
162
165
|
self.tool.hosted_extractors.destinations = MagicMock(spec_set=HostedExtractorDestinationsAPI)
|
|
163
166
|
self.tool.hosted_extractors.mappings = MagicMock(spec_set=HostedExtractorMappingsAPI)
|
|
164
167
|
self.tool.labels = MagicMock(spec_set=LabelsAPI)
|
|
168
|
+
self.tool.raw = MagicMock(spec=RawAPI)
|
|
169
|
+
self.tool.raw.databases = MagicMock(spec_set=RawDatabasesAPI)
|
|
170
|
+
self.tool.raw.tables = MagicMock(spec_set=RawTablesAPI)
|
|
165
171
|
self.tool.robotics = MagicMock(spec=RoboticsAPI)
|
|
166
172
|
self.tool.robotics.capabilities = MagicMock(spec_set=CapabilitiesAPI)
|
|
167
173
|
self.tool.robotics.data_postprocessing = MagicMock(spec_set=DataPostProcessingAPI)
|
|
@@ -14,7 +14,7 @@ from rich.progress import track
|
|
|
14
14
|
from cognite_toolkit._cdf_tk.builders import Builder, FunctionBuilder, create_builder
|
|
15
15
|
from cognite_toolkit._cdf_tk.cdf_toml import CDFToml
|
|
16
16
|
from cognite_toolkit._cdf_tk.client import ToolkitClient
|
|
17
|
-
from cognite_toolkit._cdf_tk.client.resource_classes.
|
|
17
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.identifiers import RawDatabaseId
|
|
18
18
|
from cognite_toolkit._cdf_tk.commands._base import ToolkitCommand
|
|
19
19
|
from cognite_toolkit._cdf_tk.constants import (
|
|
20
20
|
_RUNNING_IN_BROWSER,
|
|
@@ -606,7 +606,7 @@ class BuildCommand(ToolkitCommand):
|
|
|
606
606
|
if identifier:
|
|
607
607
|
identifier_kind_pairs.append((identifier, item_loader.kind))
|
|
608
608
|
if first_seen := self._ids_by_resource_type[item_loader].get(identifier):
|
|
609
|
-
if isinstance(identifier,
|
|
609
|
+
if isinstance(identifier, RawDatabaseId):
|
|
610
610
|
# RawDatabases are picked up from both RawTables and RawDatabases files. Note it is not possible
|
|
611
611
|
# to define a raw table without also defining the raw database. Thus, it is impossible to
|
|
612
612
|
# avoid duplicated RawDatabase warnings if you have multiple RawTables files.
|
|
@@ -8,7 +8,7 @@ from cognite.client.data_classes import FileMetadataWrite
|
|
|
8
8
|
|
|
9
9
|
from cognite_toolkit._cdf_tk.client.resource_classes.identifiers import ExternalId
|
|
10
10
|
from cognite_toolkit._cdf_tk.client.resource_classes.legacy.extendable_cognite_file import ExtendableCogniteFileApply
|
|
11
|
-
from cognite_toolkit._cdf_tk.client.resource_classes.
|
|
11
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.raw import RAWTableResponse
|
|
12
12
|
from cognite_toolkit._cdf_tk.constants import BUILD_FOLDER_ENCODING
|
|
13
13
|
from cognite_toolkit._cdf_tk.protocols import (
|
|
14
14
|
T_ResourceRequest,
|
|
@@ -167,7 +167,7 @@ class RawFileCRUD(DataCRUD):
|
|
|
167
167
|
for resource in state.built_resources[self.folder_name]:
|
|
168
168
|
if resource.kind != RawTableCRUD.kind:
|
|
169
169
|
continue
|
|
170
|
-
table = cast(
|
|
170
|
+
table = cast(RAWTableResponse, resource.identifier)
|
|
171
171
|
datafile = next(
|
|
172
172
|
(
|
|
173
173
|
resource.source.path.with_suffix(f".{file_type}")
|
|
@@ -210,7 +210,7 @@ class RawFileCRUD(DataCRUD):
|
|
|
210
210
|
continue
|
|
211
211
|
|
|
212
212
|
self.client.raw.rows.insert_dataframe(
|
|
213
|
-
db_name=table.db_name, table_name=table.
|
|
213
|
+
db_name=table.db_name, table_name=table.name, dataframe=data, ensure_parent=False
|
|
214
214
|
)
|
|
215
215
|
yield (
|
|
216
216
|
(f" Inserted {len(data):,} rows of {len(data.columns):,} columns from '{datafile!s}' into {table!r}."),
|
|
@@ -41,8 +41,7 @@ from rich.console import Console
|
|
|
41
41
|
from rich.markup import escape
|
|
42
42
|
|
|
43
43
|
from cognite_toolkit._cdf_tk.client import ToolkitClient
|
|
44
|
-
from cognite_toolkit._cdf_tk.client.resource_classes.identifiers import ExternalId
|
|
45
|
-
from cognite_toolkit._cdf_tk.client.resource_classes.legacy.raw import RawDatabase, RawTable
|
|
44
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.identifiers import ExternalId, RawDatabaseId, RawTableId
|
|
46
45
|
from cognite_toolkit._cdf_tk.cruds._base_cruds import ResourceCRUD
|
|
47
46
|
from cognite_toolkit._cdf_tk.exceptions import ToolkitWrongResourceError
|
|
48
47
|
from cognite_toolkit._cdf_tk.resource_classes import GroupYAML, SecurityCategoriesYAML
|
|
@@ -161,12 +160,12 @@ class GroupCRUD(ResourceCRUD[str, GroupWrite, Group]):
|
|
|
161
160
|
yield DataSetsCRUD, data_set_id
|
|
162
161
|
if table_ids := scope.get(cap.TableScope._scope_name, []):
|
|
163
162
|
for db_name, tables in table_ids.get("dbsToTables", {}).items():
|
|
164
|
-
yield RawDatabaseCRUD,
|
|
163
|
+
yield RawDatabaseCRUD, RawDatabaseId(name=db_name)
|
|
165
164
|
if isinstance(tables, list):
|
|
166
|
-
yield from ((RawTableCRUD,
|
|
165
|
+
yield from ((RawTableCRUD, RawTableId(db_name=db_name, name=table)) for table in tables)
|
|
167
166
|
elif isinstance(tables, dict) and "tables" in tables:
|
|
168
167
|
for table in tables["tables"]:
|
|
169
|
-
yield RawTableCRUD,
|
|
168
|
+
yield RawTableCRUD, RawTableId(db_name=db_name, name=table)
|
|
170
169
|
if extraction_pipeline_ids := scope.get(cap.ExtractionPipelineScope._scope_name, []):
|
|
171
170
|
if isinstance(extraction_pipeline_ids, dict) and "ids" in extraction_pipeline_ids:
|
|
172
171
|
for extraction_pipeline_id in extraction_pipeline_ids["ids"]:
|
|
@@ -35,7 +35,7 @@ from cognite.client.data_classes.extractionpipelines import (
|
|
|
35
35
|
from cognite.client.exceptions import CogniteAPIError, CogniteDuplicatedError, CogniteNotFoundError
|
|
36
36
|
from cognite.client.utils.useful_types import SequenceNotStr
|
|
37
37
|
|
|
38
|
-
from cognite_toolkit._cdf_tk.client.resource_classes.
|
|
38
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.identifiers import RawDatabaseId, RawTableId
|
|
39
39
|
from cognite_toolkit._cdf_tk.constants import BUILD_FOLDER_ENCODING
|
|
40
40
|
from cognite_toolkit._cdf_tk.cruds._base_cruds import ResourceCRUD
|
|
41
41
|
from cognite_toolkit._cdf_tk.exceptions import (
|
|
@@ -124,9 +124,9 @@ class ExtractionPipelineCRUD(ResourceCRUD[str, ExtractionPipelineWrite, Extracti
|
|
|
124
124
|
if db := entry.get("dbName"):
|
|
125
125
|
if db not in seen_databases:
|
|
126
126
|
seen_databases.add(db)
|
|
127
|
-
yield RawDatabaseCRUD,
|
|
127
|
+
yield RawDatabaseCRUD, RawDatabaseId(name=db)
|
|
128
128
|
if "tableName" in entry:
|
|
129
|
-
yield RawTableCRUD,
|
|
129
|
+
yield RawTableCRUD, RawTableId(db_name=db, name=entry["tableName"])
|
|
130
130
|
|
|
131
131
|
def load_resource(self, resource: dict[str, Any], is_dry_run: bool = False) -> ExtractionPipelineWrite:
|
|
132
132
|
if ds_external_id := resource.pop("dataSetExternalId", None):
|
|
@@ -17,7 +17,7 @@ import itertools
|
|
|
17
17
|
from collections import defaultdict
|
|
18
18
|
from collections.abc import Hashable, Iterable, Sequence
|
|
19
19
|
from pathlib import Path
|
|
20
|
-
from typing import Any,
|
|
20
|
+
from typing import Any, final
|
|
21
21
|
|
|
22
22
|
from cognite.client.data_classes.capabilities import (
|
|
23
23
|
Capability,
|
|
@@ -29,11 +29,13 @@ from rich import print
|
|
|
29
29
|
from rich.console import Console
|
|
30
30
|
|
|
31
31
|
from cognite_toolkit._cdf_tk.client import ToolkitClient
|
|
32
|
-
from cognite_toolkit._cdf_tk.client.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
from cognite_toolkit._cdf_tk.client.http_client import ToolkitAPIError
|
|
33
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.identifiers import NameId, RawDatabaseId, RawTableId
|
|
34
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.raw import (
|
|
35
|
+
RAWDatabaseRequest,
|
|
36
|
+
RAWDatabaseResponse,
|
|
37
|
+
RAWTableRequest,
|
|
38
|
+
RAWTableResponse,
|
|
37
39
|
)
|
|
38
40
|
from cognite_toolkit._cdf_tk.cruds._base_cruds import ResourceContainerCRUD, ResourceCRUD
|
|
39
41
|
from cognite_toolkit._cdf_tk.resource_classes import DatabaseYAML, TableYAML
|
|
@@ -42,11 +44,11 @@ from .auth import GroupAllScopedCRUD
|
|
|
42
44
|
|
|
43
45
|
|
|
44
46
|
@final
|
|
45
|
-
class RawDatabaseCRUD(ResourceContainerCRUD[
|
|
47
|
+
class RawDatabaseCRUD(ResourceContainerCRUD[RawDatabaseId, RAWDatabaseRequest, RAWDatabaseResponse]):
|
|
46
48
|
item_name = "raw tables"
|
|
47
49
|
folder_name = "raw"
|
|
48
|
-
resource_cls =
|
|
49
|
-
resource_write_cls =
|
|
50
|
+
resource_cls = RAWDatabaseResponse
|
|
51
|
+
resource_write_cls = RAWDatabaseRequest
|
|
50
52
|
kind = "Database"
|
|
51
53
|
yaml_cls = DatabaseYAML
|
|
52
54
|
dependencies = frozenset({GroupAllScopedCRUD})
|
|
@@ -63,7 +65,7 @@ class RawDatabaseCRUD(ResourceContainerCRUD[RawDatabase, RawDatabase, RawDatabas
|
|
|
63
65
|
|
|
64
66
|
@classmethod
|
|
65
67
|
def get_required_capability(
|
|
66
|
-
cls, items: Sequence[
|
|
68
|
+
cls, items: Sequence[RAWDatabaseRequest] | None, read_only: bool
|
|
67
69
|
) -> Capability | list[Capability]:
|
|
68
70
|
if not items and items is not None:
|
|
69
71
|
return []
|
|
@@ -78,86 +80,89 @@ class RawDatabaseCRUD(ResourceContainerCRUD[RawDatabase, RawDatabase, RawDatabas
|
|
|
78
80
|
if items:
|
|
79
81
|
tables_by_database: dict[str, list[str]] = {}
|
|
80
82
|
for item in items:
|
|
81
|
-
tables_by_database[item.
|
|
83
|
+
tables_by_database[item.name] = []
|
|
82
84
|
|
|
83
85
|
scope = RawAcl.Scope.Table(dict(tables_by_database)) if tables_by_database else RawAcl.Scope.All()
|
|
84
86
|
|
|
85
87
|
return RawAcl(actions, scope)
|
|
86
88
|
|
|
87
89
|
@classmethod
|
|
88
|
-
def get_id(cls, item:
|
|
90
|
+
def get_id(cls, item: RAWDatabaseResponse | RAWDatabaseRequest | dict) -> RawDatabaseId:
|
|
89
91
|
if isinstance(item, dict):
|
|
90
|
-
return
|
|
91
|
-
return item
|
|
92
|
+
return RawDatabaseId.model_validate(item)
|
|
93
|
+
return RawDatabaseId(name=item.name)
|
|
92
94
|
|
|
93
95
|
@classmethod
|
|
94
|
-
def dump_id(cls, id:
|
|
95
|
-
return {"dbName": id.
|
|
96
|
+
def dump_id(cls, id: RawDatabaseId) -> dict[str, Any]:
|
|
97
|
+
return {"dbName": id.name}
|
|
96
98
|
|
|
97
|
-
def
|
|
98
|
-
|
|
99
|
-
return RawDatabaseList([RawDatabase(db_name=db.name) for db in database_list if db.name])
|
|
99
|
+
def dump_resource(self, resource: RAWDatabaseResponse, local: dict[str, Any] | None = None) -> dict[str, Any]:
|
|
100
|
+
return {"dbName": resource.name}
|
|
100
101
|
|
|
101
|
-
def
|
|
102
|
-
|
|
103
|
-
target_dbs = {db.db_name for db in ids}
|
|
104
|
-
return RawDatabaseList([RawDatabase(db_name=db.name) for db in database_list if db.name in target_dbs])
|
|
102
|
+
def create(self, items: Sequence[RAWDatabaseRequest]) -> list[RAWDatabaseResponse]:
|
|
103
|
+
return self.client.tool.raw.databases.create(items)
|
|
105
104
|
|
|
106
|
-
def
|
|
107
|
-
|
|
105
|
+
def retrieve(self, ids: SequenceNotStr[RawDatabaseId]) -> list[RAWDatabaseResponse]:
|
|
106
|
+
database_list = self.client.tool.raw.databases.list(limit=None)
|
|
107
|
+
target_dbs = {db.name for db in ids}
|
|
108
|
+
return [db for db in database_list if db.name in target_dbs]
|
|
109
|
+
|
|
110
|
+
def delete(self, ids: SequenceNotStr[RawDatabaseId]) -> int:
|
|
111
|
+
ids_list = list(ids)
|
|
108
112
|
try:
|
|
109
|
-
self.client.raw.databases.delete(
|
|
110
|
-
except
|
|
113
|
+
self.client.tool.raw.databases.delete(ids_list)
|
|
114
|
+
except ToolkitAPIError as e:
|
|
111
115
|
# Bug in API, missing is returned as failed
|
|
112
|
-
if e.
|
|
113
|
-
self.client.raw.databases.delete(
|
|
116
|
+
if e.missing and (remaining := [db for db in ids_list if db.name not in e.missing]):
|
|
117
|
+
self.client.tool.raw.databases.delete(remaining)
|
|
114
118
|
elif e.code == 404 and "not found" in e.message and "database" in e.message:
|
|
115
119
|
return 0
|
|
116
120
|
else:
|
|
117
121
|
raise e
|
|
118
|
-
return len(
|
|
122
|
+
return len(ids_list)
|
|
119
123
|
|
|
120
124
|
def _iterate(
|
|
121
125
|
self,
|
|
122
126
|
data_set_external_id: str | None = None,
|
|
123
127
|
space: str | None = None,
|
|
124
128
|
parent_ids: list[Hashable] | None = None,
|
|
125
|
-
) -> Iterable[
|
|
126
|
-
|
|
129
|
+
) -> Iterable[RAWDatabaseResponse]:
|
|
130
|
+
for databases in self.client.tool.raw.databases.iterate():
|
|
131
|
+
yield from databases
|
|
127
132
|
|
|
128
|
-
def count(self, ids: SequenceNotStr[
|
|
133
|
+
def count(self, ids: SequenceNotStr[RawDatabaseId]) -> int:
|
|
129
134
|
nr_of_tables = 0
|
|
130
|
-
for db_name, raw_tables in itertools.groupby(sorted(ids, key=lambda x: x.
|
|
135
|
+
for db_name, raw_tables in itertools.groupby(sorted(ids, key=lambda x: x.name), key=lambda x: x.name):
|
|
131
136
|
try:
|
|
132
|
-
tables = self.client.raw.tables.list(db_name=db_name, limit
|
|
137
|
+
tables = self.client.tool.raw.tables.list(db_name=db_name, limit=None)
|
|
133
138
|
except CogniteAPIError as e:
|
|
134
139
|
if db_name in {item.get("name") for item in e.missing or []}:
|
|
135
140
|
continue
|
|
136
141
|
raise e
|
|
137
|
-
nr_of_tables += len(tables
|
|
142
|
+
nr_of_tables += len(tables)
|
|
138
143
|
return nr_of_tables
|
|
139
144
|
|
|
140
|
-
def drop_data(self, ids: SequenceNotStr[
|
|
145
|
+
def drop_data(self, ids: SequenceNotStr[RawDatabaseId]) -> int:
|
|
141
146
|
nr_of_tables = 0
|
|
142
|
-
for db_name, raw_tables in itertools.groupby(sorted(ids, key=lambda x: x.
|
|
147
|
+
for db_name, raw_tables in itertools.groupby(sorted(ids, key=lambda x: x.name), key=lambda x: x.name):
|
|
143
148
|
try:
|
|
144
|
-
existing = self.client.raw.tables.list(db_name=db_name, limit
|
|
145
|
-
except
|
|
149
|
+
existing = self.client.tool.raw.tables.list(db_name=db_name, limit=None)
|
|
150
|
+
except ToolkitAPIError as e:
|
|
146
151
|
if db_name in {item.get("name") for item in e.missing or []}:
|
|
147
152
|
continue
|
|
148
153
|
raise e
|
|
149
154
|
if existing:
|
|
150
|
-
self.client.raw.tables.delete(
|
|
155
|
+
self.client.tool.raw.tables.delete([table.as_id() for table in existing])
|
|
151
156
|
nr_of_tables += len(existing)
|
|
152
157
|
return nr_of_tables
|
|
153
158
|
|
|
154
159
|
|
|
155
160
|
@final
|
|
156
|
-
class RawTableCRUD(ResourceContainerCRUD[
|
|
161
|
+
class RawTableCRUD(ResourceContainerCRUD[RawTableId, RAWTableRequest, RAWTableResponse]):
|
|
157
162
|
item_name = "raw rows"
|
|
158
163
|
folder_name = "raw"
|
|
159
|
-
resource_cls =
|
|
160
|
-
resource_write_cls =
|
|
164
|
+
resource_cls = RAWTableResponse
|
|
165
|
+
resource_write_cls = RAWTableRequest
|
|
161
166
|
kind = "Table"
|
|
162
167
|
yaml_cls = TableYAML
|
|
163
168
|
support_update = False
|
|
@@ -175,7 +180,7 @@ class RawTableCRUD(ResourceContainerCRUD[RawTable, RawTable, RawTable]):
|
|
|
175
180
|
|
|
176
181
|
@classmethod
|
|
177
182
|
def get_required_capability(
|
|
178
|
-
cls, items: Sequence[
|
|
183
|
+
cls, items: Sequence[RAWTableRequest] | None, read_only: bool
|
|
179
184
|
) -> Capability | list[Capability]:
|
|
180
185
|
if not items and items is not None:
|
|
181
186
|
return []
|
|
@@ -190,75 +195,70 @@ class RawTableCRUD(ResourceContainerCRUD[RawTable, RawTable, RawTable]):
|
|
|
190
195
|
if items:
|
|
191
196
|
tables_by_database = defaultdict(list)
|
|
192
197
|
for item in items:
|
|
193
|
-
tables_by_database[item.db_name].append(item.
|
|
198
|
+
tables_by_database[item.db_name].append(item.name)
|
|
194
199
|
|
|
195
200
|
scope = RawAcl.Scope.Table(dict(tables_by_database)) if tables_by_database else RawAcl.Scope.All()
|
|
196
201
|
|
|
197
202
|
return RawAcl(actions, scope)
|
|
198
203
|
|
|
199
204
|
@classmethod
|
|
200
|
-
def get_id(cls, item:
|
|
205
|
+
def get_id(cls, item: RAWTableResponse | RAWTableRequest | dict) -> RawTableId:
|
|
201
206
|
if isinstance(item, dict):
|
|
202
207
|
if missing := tuple(k for k in {"dbName", "tableName"} if k not in item):
|
|
203
208
|
# We need to raise a KeyError with all missing keys to get the correct error message.
|
|
204
209
|
raise KeyError(*missing)
|
|
205
|
-
return
|
|
206
|
-
return item
|
|
210
|
+
return RawTableId(db_name=item["dbName"], name=item["tableName"])
|
|
211
|
+
return RawTableId(db_name=item.db_name, name=item.name)
|
|
207
212
|
|
|
208
213
|
@classmethod
|
|
209
|
-
def dump_id(cls, id:
|
|
210
|
-
return {"dbName": id.db_name, "tableName": id.
|
|
214
|
+
def dump_id(cls, id: RawTableId) -> dict[str, Any]:
|
|
215
|
+
return {"dbName": id.db_name, "tableName": id.name}
|
|
211
216
|
|
|
212
217
|
@classmethod
|
|
213
218
|
def get_dependent_items(cls, item: dict) -> Iterable[tuple[type[ResourceCRUD], Hashable]]:
|
|
214
219
|
if "dbName" in item:
|
|
215
|
-
yield RawDatabaseCRUD,
|
|
216
|
-
|
|
217
|
-
def
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
def retrieve(self, ids: SequenceNotStr[RawTable]) -> RawTableList:
|
|
226
|
-
retrieved = RawTableList([])
|
|
220
|
+
yield RawDatabaseCRUD, RawDatabaseId(name=item["dbName"])
|
|
221
|
+
|
|
222
|
+
def dump_resource(self, resource: RAWTableResponse, local: dict[str, Any] | None = None) -> dict[str, Any]:
|
|
223
|
+
return {"dbName": resource.db_name, "tableName": resource.name}
|
|
224
|
+
|
|
225
|
+
def create(self, items: Sequence[RAWTableRequest]) -> list[RAWTableResponse]:
|
|
226
|
+
return self.client.tool.raw.tables.create(items)
|
|
227
|
+
|
|
228
|
+
def retrieve(self, ids: SequenceNotStr[RawTableId]) -> list[RAWTableResponse]:
|
|
229
|
+
retrieved: list[RAWTableResponse] = []
|
|
227
230
|
for db_name, raw_tables in itertools.groupby(sorted(ids, key=lambda x: x.db_name), key=lambda x: x.db_name):
|
|
228
|
-
expected_tables = {table.
|
|
231
|
+
expected_tables = {table.name for table in raw_tables}
|
|
229
232
|
try:
|
|
230
|
-
tables = self.client.raw.tables.list(db_name=db_name, limit
|
|
231
|
-
except
|
|
233
|
+
tables = self.client.tool.raw.tables.list(db_name=db_name, limit=None)
|
|
234
|
+
except ToolkitAPIError as e:
|
|
232
235
|
if db_name in {item.get("name") for item in e.missing or []}:
|
|
233
236
|
continue
|
|
234
237
|
raise e
|
|
235
|
-
retrieved.extend(
|
|
236
|
-
[RawTable(db_name=db_name, table_name=table.name) for table in tables if table.name in expected_tables]
|
|
237
|
-
)
|
|
238
|
+
retrieved.extend(table for table in tables if table.name in expected_tables)
|
|
238
239
|
return retrieved
|
|
239
240
|
|
|
240
|
-
def delete(self, ids: SequenceNotStr[
|
|
241
|
+
def delete(self, ids: SequenceNotStr[RawTableId]) -> int:
|
|
241
242
|
count = 0
|
|
242
243
|
for db_name, raw_tables in itertools.groupby(sorted(ids, key=lambda x: x.db_name), key=lambda x: x.db_name):
|
|
243
|
-
|
|
244
|
-
if
|
|
244
|
+
tables_to_delete = [table for table in raw_tables if table.name]
|
|
245
|
+
if tables_to_delete:
|
|
245
246
|
try:
|
|
246
|
-
self.client.raw.tables.delete(
|
|
247
|
-
except
|
|
247
|
+
self.client.tool.raw.tables.delete(tables_to_delete)
|
|
248
|
+
except ToolkitAPIError as e:
|
|
248
249
|
if e.code != 404:
|
|
249
250
|
raise e
|
|
250
|
-
|
|
251
|
-
missing = {item.get("name") for item in (e.missing or [])}.union(set(e.failed or []))
|
|
251
|
+
missing = {item.get("name") for item in (e.missing or [])}
|
|
252
252
|
if "not found" in e.message and "database" in e.message:
|
|
253
253
|
continue
|
|
254
|
-
elif
|
|
255
|
-
self.client.raw.tables.delete(
|
|
256
|
-
elif not
|
|
254
|
+
elif remaining := [t for t in tables_to_delete if t.name not in missing]:
|
|
255
|
+
self.client.tool.raw.tables.delete(remaining)
|
|
256
|
+
elif not remaining:
|
|
257
257
|
# Table does not exist.
|
|
258
258
|
continue
|
|
259
259
|
else:
|
|
260
260
|
raise e
|
|
261
|
-
count += len(
|
|
261
|
+
count += len(tables_to_delete)
|
|
262
262
|
return count
|
|
263
263
|
|
|
264
264
|
def _iterate(
|
|
@@ -266,28 +266,36 @@ class RawTableCRUD(ResourceContainerCRUD[RawTable, RawTable, RawTable]):
|
|
|
266
266
|
data_set_external_id: str | None = None,
|
|
267
267
|
space: str | None = None,
|
|
268
268
|
parent_ids: list[Hashable] | None = None,
|
|
269
|
-
) -> Iterable[
|
|
270
|
-
|
|
271
|
-
|
|
269
|
+
) -> Iterable[RAWTableResponse]:
|
|
270
|
+
if parent_ids is None:
|
|
271
|
+
dbs = self.client.tool.raw.databases.list(limit=None)
|
|
272
|
+
parent_ids = [RawDatabaseId(name=db.name) for db in dbs]
|
|
273
|
+
for parent_id in parent_ids:
|
|
274
|
+
if not isinstance(parent_id, NameId):
|
|
272
275
|
continue
|
|
273
|
-
for
|
|
274
|
-
yield
|
|
276
|
+
for tables in self.client.tool.raw.tables.iterate(db_name=parent_id.name):
|
|
277
|
+
yield from tables
|
|
275
278
|
|
|
276
|
-
def count(self, ids: SequenceNotStr[
|
|
279
|
+
def count(self, ids: SequenceNotStr[RawTableId]) -> int:
|
|
277
280
|
if not self._printed_warning:
|
|
278
281
|
print(" [bold green]INFO:[/] Raw rows do not support count (there is no aggregation method).")
|
|
279
282
|
self._printed_warning = True
|
|
280
283
|
return -1
|
|
281
284
|
|
|
282
|
-
def drop_data(self, ids: SequenceNotStr[
|
|
285
|
+
def drop_data(self, ids: SequenceNotStr[RawTableId]) -> int:
|
|
283
286
|
for db_name, raw_tables in itertools.groupby(sorted(ids, key=lambda x: x.db_name), key=lambda x: x.db_name):
|
|
284
287
|
try:
|
|
285
|
-
|
|
288
|
+
existing_tables = self.client.tool.raw.tables.list(db_name=db_name, limit=None)
|
|
289
|
+
existing_names = {table.name for table in existing_tables}
|
|
286
290
|
except CogniteAPIError as e:
|
|
287
291
|
if db_name in {item.get("name") for item in e.missing or []}:
|
|
288
292
|
continue
|
|
289
293
|
raise e
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
294
|
+
tables_to_delete = [
|
|
295
|
+
RAWTableResponse(db_name=db_name, name=table.name)
|
|
296
|
+
for table in raw_tables
|
|
297
|
+
if table.name in existing_names
|
|
298
|
+
]
|
|
299
|
+
if tables_to_delete:
|
|
300
|
+
self.client.tool.raw.tables.delete([table.as_id() for table in tables_to_delete])
|
|
293
301
|
return -1
|
|
@@ -65,7 +65,7 @@ from rich import print
|
|
|
65
65
|
from rich.console import Console
|
|
66
66
|
|
|
67
67
|
from cognite_toolkit._cdf_tk.client import ToolkitClient
|
|
68
|
-
from cognite_toolkit._cdf_tk.client.resource_classes.
|
|
68
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.identifiers import RawDatabaseId, RawTableId
|
|
69
69
|
from cognite_toolkit._cdf_tk.constants import BUILD_FOLDER_ENCODING
|
|
70
70
|
from cognite_toolkit._cdf_tk.cruds._base_cruds import ResourceCRUD
|
|
71
71
|
from cognite_toolkit._cdf_tk.exceptions import (
|
|
@@ -186,8 +186,8 @@ class TransformationCRUD(ResourceCRUD[str, TransformationWrite, Transformation])
|
|
|
186
186
|
if not isinstance(destination, dict):
|
|
187
187
|
return
|
|
188
188
|
if destination.get("type") == "raw" and in_dict(("database", "table"), destination):
|
|
189
|
-
yield RawDatabaseCRUD,
|
|
190
|
-
yield RawTableCRUD,
|
|
189
|
+
yield RawDatabaseCRUD, RawDatabaseId(name=destination["database"])
|
|
190
|
+
yield RawTableCRUD, RawTableId(db_name=destination["database"], name=destination["table"])
|
|
191
191
|
elif destination.get("type") in ("nodes", "edges") and (view := destination.get("view", {})):
|
|
192
192
|
if space := destination.get("instanceSpace"):
|
|
193
193
|
yield SpaceCRUD, space
|
cognite_toolkit/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.7.
|
|
1
|
+
__version__ = "0.7.73"
|
|
@@ -23,7 +23,7 @@ cognite_toolkit/_cdf_tk/builders/_datamodels.py,sha256=hN3fWQAktrWdaGAItZ0tHpBXq
|
|
|
23
23
|
cognite_toolkit/_cdf_tk/builders/_file.py,sha256=ZRTlyb-MnmJhBhfPeQ9h7gM2T4nllyjonwYBj31cv1Q,3847
|
|
24
24
|
cognite_toolkit/_cdf_tk/builders/_function.py,sha256=jrXZPSck6GVguChl1kiWRTbrsiLWjyC5FupNDvAZWek,7614
|
|
25
25
|
cognite_toolkit/_cdf_tk/builders/_location.py,sha256=Ix26T6JSlmp_Ij3iKaClbBQtRF3hR-wDKkZu9B-NblA,3968
|
|
26
|
-
cognite_toolkit/_cdf_tk/builders/_raw.py,sha256=
|
|
26
|
+
cognite_toolkit/_cdf_tk/builders/_raw.py,sha256=k5y21KglHJc7ewrdqPtH0mcbbuirTxUk_binUnfvMBg,3275
|
|
27
27
|
cognite_toolkit/_cdf_tk/builders/_streamlit.py,sha256=WsrQTaTwuyewNJ2y04tA16iEK-bpr0cL4sup9-89H6o,4996
|
|
28
28
|
cognite_toolkit/_cdf_tk/builders/_transformation.py,sha256=STB42zhzOW5M_-b8cKOQ_cegnr7FtMoMxZ87gPLXft4,4723
|
|
29
29
|
cognite_toolkit/_cdf_tk/cdf_toml.py,sha256=VSWV9h44HusWIaKpWgjrOMrc3hDoPTTXBXlp6-NOrIM,9079
|
|
@@ -69,7 +69,7 @@ cognite_toolkit/_cdf_tk/client/api/location_filters.py,sha256=TBoIUCGbJC7vLn6SYX
|
|
|
69
69
|
cognite_toolkit/_cdf_tk/client/api/lookup.py,sha256=c-cvtgfGGGYyk8ROcJu44qlo1ocqbk0o1zafCql79fU,17652
|
|
70
70
|
cognite_toolkit/_cdf_tk/client/api/migration.py,sha256=wYwu5xzNS_-E_vJIOXxPWr6_iRsL9Mld2rLZtOeK9pQ,23106
|
|
71
71
|
cognite_toolkit/_cdf_tk/client/api/project.py,sha256=IN6F2oWT_GBaNQhW8fWoVr-GBQMfncKV2Ibgxd3qRmA,1634
|
|
72
|
-
cognite_toolkit/_cdf_tk/client/api/raw.py,sha256=
|
|
72
|
+
cognite_toolkit/_cdf_tk/client/api/raw.py,sha256=1fcfNePkxd5FVnKwEoI0vqmRUjItghRUzBuWY9Ch6_A,8358
|
|
73
73
|
cognite_toolkit/_cdf_tk/client/api/relationships.py,sha256=RpKav2wWoEmSfGNLsi_3Zh0yyEZ7XlmmKJyhUOlGIjg,4983
|
|
74
74
|
cognite_toolkit/_cdf_tk/client/api/robotics.py,sha256=N32x6d4s4RNLrotAiYzBQMmXKRGS0pefjoQGkBmbSPI,969
|
|
75
75
|
cognite_toolkit/_cdf_tk/client/api/robotics_capabilities.py,sha256=vd9qo9aYm-Y-p448cPRdq80uIPaWq-EK2Kaeob9YvN0,5112
|
|
@@ -102,8 +102,8 @@ cognite_toolkit/_cdf_tk/client/cdf_client/responses.py,sha256=0K_19_jXgTx_d657ld
|
|
|
102
102
|
cognite_toolkit/_cdf_tk/client/config.py,sha256=weMR43z-gqHMn-Jqvfmh_nJ0HbgEdyeCGtISuEf3OuY,4269
|
|
103
103
|
cognite_toolkit/_cdf_tk/client/http_client/__init__.py,sha256=_B_eB9yZ97ctfWFNrrK722R-WkMbktZECeiqZlUUee8,674
|
|
104
104
|
cognite_toolkit/_cdf_tk/client/http_client/_client.py,sha256=dUC-8XsKwBelQbMFbyK_fOEh5qeu9HsNrWSJgdWXt44,15865
|
|
105
|
-
cognite_toolkit/_cdf_tk/client/http_client/_data_classes.py,sha256=
|
|
106
|
-
cognite_toolkit/_cdf_tk/client/http_client/_exception.py,sha256=
|
|
105
|
+
cognite_toolkit/_cdf_tk/client/http_client/_data_classes.py,sha256=o8l8AZaoimapiC2-deusPUTpuji7rQ7QBxlSjWrNJiM,5452
|
|
106
|
+
cognite_toolkit/_cdf_tk/client/http_client/_exception.py,sha256=0eN1bPmmqFtpfm5K3u1sUMRlRYdpqfPQ8egl6GqTego,511
|
|
107
107
|
cognite_toolkit/_cdf_tk/client/http_client/_item_classes.py,sha256=Jjbvt0HjR9kcDpmFXsVRtwJvQqvEq6UOJO9xutSibr8,4454
|
|
108
108
|
cognite_toolkit/_cdf_tk/client/http_client/_tracker.py,sha256=pu6oA-XpOeaOLdoeD_mGfJXC3BFGWfh5oGcRDpb6maw,1407
|
|
109
109
|
cognite_toolkit/_cdf_tk/client/request_classes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -153,7 +153,7 @@ cognite_toolkit/_cdf_tk/client/resource_classes/hosted_extractor_source/_eventhu
|
|
|
153
153
|
cognite_toolkit/_cdf_tk/client/resource_classes/hosted_extractor_source/_kafka.py,sha256=M9tEQWulhNDDxbkM0O5a7Xi1K5VkGM3MLFEft5XJVKs,1774
|
|
154
154
|
cognite_toolkit/_cdf_tk/client/resource_classes/hosted_extractor_source/_mqtt.py,sha256=RJhR5eAEkRt8Ze2r0vwmEZ-2azbDxQSlmUFxD1o2Ovk,1265
|
|
155
155
|
cognite_toolkit/_cdf_tk/client/resource_classes/hosted_extractor_source/_rest.py,sha256=OSiPMEH_dMCUC3L1QpIOmJSXyYYRlqt-_lHZpPTv9Sw,1729
|
|
156
|
-
cognite_toolkit/_cdf_tk/client/resource_classes/identifiers.py,sha256=
|
|
156
|
+
cognite_toolkit/_cdf_tk/client/resource_classes/identifiers.py,sha256=1HPKyLJaXpWF0R9x_bLy8PkdPB7zj861L9ODkJrAD9c,2730
|
|
157
157
|
cognite_toolkit/_cdf_tk/client/resource_classes/infield.py,sha256=hpL79vuvKOVWap0GNr-VYxdqBQvvuu3EPQDL7a-MrjU,6932
|
|
158
158
|
cognite_toolkit/_cdf_tk/client/resource_classes/instance_api.py,sha256=L5Qe6hqqFEIrw6JGK2DFvjQRH8N8fbJXFeQ51c5VH8s,7803
|
|
159
159
|
cognite_toolkit/_cdf_tk/client/resource_classes/label.py,sha256=-w7VxTOmHZkgiEjQ-trGY2JOWo-ZU4nqhmM2UrpkhEI,650
|
|
@@ -178,7 +178,7 @@ cognite_toolkit/_cdf_tk/client/resource_classes/legacy/sequences.py,sha256=02d34
|
|
|
178
178
|
cognite_toolkit/_cdf_tk/client/resource_classes/legacy/streamlit_.py,sha256=nEk00FH3i-px2r6ql4kk1VVL4sytjUn0_sTkEdDSHVc,6746
|
|
179
179
|
cognite_toolkit/_cdf_tk/client/resource_classes/location_filter.py,sha256=GKvfTlnF_JiVrIAAgLZY5nElLvb9bhC5VqT4Jezml5Y,2838
|
|
180
180
|
cognite_toolkit/_cdf_tk/client/resource_classes/project.py,sha256=smElRldxcG_M_yrFBxUW-ka6eQDgYApMBMESkljAri8,758
|
|
181
|
-
cognite_toolkit/_cdf_tk/client/resource_classes/raw.py,sha256=
|
|
181
|
+
cognite_toolkit/_cdf_tk/client/resource_classes/raw.py,sha256=T6pTykEp4KDk0cLqZikNeeb3oedmakOQ7h9YaT9Rm5U,3523
|
|
182
182
|
cognite_toolkit/_cdf_tk/client/resource_classes/relationship.py,sha256=cqe45BYHZ_6ZNjlyglLNdQWm01jxxftUHSjBa1EYwZs,1421
|
|
183
183
|
cognite_toolkit/_cdf_tk/client/resource_classes/resource_view_mapping.py,sha256=0A4U9EFo69hca5w6ddQNU9GNnzw8og0uC_rvi5k7j94,1159
|
|
184
184
|
cognite_toolkit/_cdf_tk/client/resource_classes/robotics/__init__.py,sha256=AaXN4lmZNO6PwhOYLXuY4JZMpBGyW71MVKQlcdzEo2w,1125
|
|
@@ -202,7 +202,7 @@ cognite_toolkit/_cdf_tk/client/resource_classes/transformation.py,sha256=20W9OJQ
|
|
|
202
202
|
cognite_toolkit/_cdf_tk/client/resource_classes/workflow.py,sha256=OGTNOZNA6xFDzimRIBYj935RYWYBv863tGXplSVAdMQ,687
|
|
203
203
|
cognite_toolkit/_cdf_tk/client/resource_classes/workflow_trigger.py,sha256=NCuH4RKbOblDJ0v_T-n9_MxxX2jpAEG5nt-qXprOle4,1558
|
|
204
204
|
cognite_toolkit/_cdf_tk/client/resource_classes/workflow_version.py,sha256=K0lJulTc8zg7-fB7Q2wDqAA6Qy9oTrhUD2WgLHlC5S8,4246
|
|
205
|
-
cognite_toolkit/_cdf_tk/client/testing.py,sha256=
|
|
205
|
+
cognite_toolkit/_cdf_tk/client/testing.py,sha256=nbFwlk19s-3srU7E8NvcpTZS6P4fPc4yAegXcbACSEg,10641
|
|
206
206
|
cognite_toolkit/_cdf_tk/client/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
207
207
|
cognite_toolkit/_cdf_tk/client/utils/_concurrency.py,sha256=3GtQbKDaosyKHEt-KzxKK9Yie4TvZPdoou2vUk6dUa8,2298
|
|
208
208
|
cognite_toolkit/_cdf_tk/client/utils/_http_client.py,sha256=oXNKrIaizG4WiSAhL_kSCHAuL4aaaEhCU4pOJGxh6Xs,483
|
|
@@ -232,7 +232,7 @@ cognite_toolkit/_cdf_tk/commands/_utils.py,sha256=UxMJW5QYKts4om5n6x2Tq2ihvfO9gW
|
|
|
232
232
|
cognite_toolkit/_cdf_tk/commands/_virtual_env.py,sha256=GFAid4hplixmj9_HkcXqU5yCLj-fTXm4cloGD6U2swY,2180
|
|
233
233
|
cognite_toolkit/_cdf_tk/commands/about.py,sha256=pEXNdCeJYONOalH8x-7QRsKLgj-9gdIqN16pPxA3bhg,9395
|
|
234
234
|
cognite_toolkit/_cdf_tk/commands/auth.py,sha256=l_WW_tDgkpN_e0Aoc_3EYql_omYZTg5PBtMFCSbJ_b8,33780
|
|
235
|
-
cognite_toolkit/_cdf_tk/commands/build_cmd.py,sha256=
|
|
235
|
+
cognite_toolkit/_cdf_tk/commands/build_cmd.py,sha256=qKIyrPhF-e_NQCJCyxw04Ip66RkMU3a08aDa4TpHkUk,29150
|
|
236
236
|
cognite_toolkit/_cdf_tk/commands/build_v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
237
237
|
cognite_toolkit/_cdf_tk/commands/build_v2/_module_parser.py,sha256=B_Ddt8oB3tWto0Ocja9kvWaoIZyt8Oa-ukuoptQBYww,5916
|
|
238
238
|
cognite_toolkit/_cdf_tk/commands/build_v2/_modules_parser.py,sha256=se9IhfwtbvWusqNeN2BzDnUEK3j97sN4Yugoh5xlc5U,6782
|
|
@@ -253,15 +253,15 @@ cognite_toolkit/_cdf_tk/commands/run.py,sha256=ETOuPokyF8_mnwVYF8j3hSGiSxKZnRUOK
|
|
|
253
253
|
cognite_toolkit/_cdf_tk/constants.py,sha256=TplKm2J9pGRHq7nAnLI0caTMHetS04OIz3hfq-jvGzo,7236
|
|
254
254
|
cognite_toolkit/_cdf_tk/cruds/__init__.py,sha256=xABXmF_3BhfNMRpr9aF9PyUayx7tkhqvVmzrRAf8eRE,7073
|
|
255
255
|
cognite_toolkit/_cdf_tk/cruds/_base_cruds.py,sha256=6I1P0kZKxX7CDHM3_xPNnMJQi_QEviE_XnhpM_PAULc,17652
|
|
256
|
-
cognite_toolkit/_cdf_tk/cruds/_data_cruds.py,sha256=
|
|
256
|
+
cognite_toolkit/_cdf_tk/cruds/_data_cruds.py,sha256=UCifIIbfQ3-xWIyIsGb1BFrKSDcwGaqXYJkSpogN9-g,8987
|
|
257
257
|
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/__init__.py,sha256=TTO_GE8AfUb4ra2uROyjHj9wsaT-vKb0mU5I_WEchxc,3014
|
|
258
258
|
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/agent.py,sha256=2UjX0m85fw_zt4EpCm5Ihz2gE1AlgOgR8-7Pr8M2c4g,5128
|
|
259
|
-
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/auth.py,sha256=
|
|
259
|
+
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/auth.py,sha256=Bwv8lVJDFeTlOFHqLZr2Odb9Gh8o3drnGT-w2v9aWJU,24794
|
|
260
260
|
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/classic.py,sha256=J55_iJcCHxt7NmaW58_7Njb77z23WzGbAcp0goZyBK4,26319
|
|
261
261
|
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/configuration.py,sha256=Yargg3pzjfd6grd_LACHjZIreuyqOWkEe2Bh_-cdan0,5822
|
|
262
262
|
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/data_organization.py,sha256=U0ItuoNr1KEtoFQAiIe-K19_72ht9-kGndFVgF-iC10,9524
|
|
263
263
|
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/datamodel.py,sha256=Deyx0iAxiGmw3jLuTA03Yf9Vx1YzehGSnOtg7i0JBPE,64878
|
|
264
|
-
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/extraction_pipeline.py,sha256=
|
|
264
|
+
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/extraction_pipeline.py,sha256=gC_voB24j0n1WRIGDPhOaEpcHTtFmawfeI29EzjosQo,17742
|
|
265
265
|
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/fieldops.py,sha256=yiMjkr1d0Dgw4WRMIk0XhGzvd-Rqo3Kd0wfBfbZV89A,20762
|
|
266
266
|
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/file.py,sha256=LvlukwvRIQm8cX-YWfTGVjO74ZnPMDGv3m5Cd7pfgx8,14977
|
|
267
267
|
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/function.py,sha256=OSJlIiqyBqbSiEf4w7EGflMAk9Yvc96J3VFkYZlk3zw,29605
|
|
@@ -270,14 +270,14 @@ cognite_toolkit/_cdf_tk/cruds/_resource_cruds/hosted_extractors.py,sha256=pRyClY
|
|
|
270
270
|
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/industrial_tool.py,sha256=iZJGzo02cVjs_9zcVobe84mkBe5HcTzFEZU7HAA1RZ0,7867
|
|
271
271
|
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/location.py,sha256=sOZunu027t-2ocuICqc2WgRYOMVYxc7n2fVgXmIfkmo,12226
|
|
272
272
|
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/migration.py,sha256=8-7QgL4g-DMJHwBbOFAg4QscMNA1RMCqHfZYQlSNKU4,4467
|
|
273
|
-
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/raw.py,sha256=
|
|
273
|
+
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/raw.py,sha256=r3hXvK9zmFwP0BwAM5PefpVnxX_O40dIzW3bgIH4apU,12508
|
|
274
274
|
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/relationship.py,sha256=TO2Y6TZJEGxyKv7EMOtyyALz3Wyigp0mwBSQVTL-D5A,6330
|
|
275
275
|
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/robotics.py,sha256=T24aBMldMKCAChIh-yyVtXTdjel3nLtpqHnpVUrkdxA,17284
|
|
276
276
|
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/simulators.py,sha256=LupOpIf8SCiOGA36T5Gkh-_VGpsI4B_vKjXqp3a9Eyk,5139
|
|
277
277
|
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/streams.py,sha256=tzloZdY1THodpkWIS4pOyq78ektTg1G7GdIf3A-TiJ4,2712
|
|
278
278
|
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/three_d_model.py,sha256=5jIRF2JqosVHyAi2Ek6H38K2FWcNqrbPOR6MTSIEAQI,7320
|
|
279
279
|
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/timeseries.py,sha256=k6E-BWU2RVJCzC_HAUhzbHzensvRt4b3vNa3GSvFr-M,23262
|
|
280
|
-
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/transformation.py,sha256=
|
|
280
|
+
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/transformation.py,sha256=AZ1sBL1FfodY-tHDoBwE2Z0pxOJRkmFSvkuR0a4hzTQ,35174
|
|
281
281
|
cognite_toolkit/_cdf_tk/cruds/_resource_cruds/workflow.py,sha256=dVkf7OpZHV2H7V3zRU4BzUqDxgAudiWBJPvGeydATCg,26035
|
|
282
282
|
cognite_toolkit/_cdf_tk/cruds/_worker.py,sha256=QeZjziBCePilyI4WfTZvLfSHGT3qJGCMhugsoO1SVtU,9285
|
|
283
283
|
cognite_toolkit/_cdf_tk/data_classes/__init__.py,sha256=kh4S_jNDDWdTjCCnd5r5PC7zrbdyDQkoOSEofTk6p8A,1788
|
|
@@ -422,13 +422,13 @@ cognite_toolkit/_repo_files/.gitignore,sha256=ip9kf9tcC5OguF4YF4JFEApnKYw0nG0vPi
|
|
|
422
422
|
cognite_toolkit/_repo_files/AzureDevOps/.devops/README.md,sha256=OLA0D7yCX2tACpzvkA0IfkgQ4_swSd-OlJ1tYcTBpsA,240
|
|
423
423
|
cognite_toolkit/_repo_files/AzureDevOps/.devops/deploy-pipeline.yml,sha256=brULcs8joAeBC_w_aoWjDDUHs3JheLMIR9ajPUK96nc,693
|
|
424
424
|
cognite_toolkit/_repo_files/AzureDevOps/.devops/dry-run-pipeline.yml,sha256=OBFDhFWK1mlT4Dc6mDUE2Es834l8sAlYG50-5RxRtHk,723
|
|
425
|
-
cognite_toolkit/_repo_files/GitHub/.github/workflows/deploy.yaml,sha256=
|
|
426
|
-
cognite_toolkit/_repo_files/GitHub/.github/workflows/dry-run.yaml,sha256=
|
|
427
|
-
cognite_toolkit/_resources/cdf.toml,sha256=
|
|
428
|
-
cognite_toolkit/_version.py,sha256=
|
|
425
|
+
cognite_toolkit/_repo_files/GitHub/.github/workflows/deploy.yaml,sha256=y92vr2Yf36Dw19nT74tdpb0WSJqmVH32XlvwVJylwMw,667
|
|
426
|
+
cognite_toolkit/_repo_files/GitHub/.github/workflows/dry-run.yaml,sha256=ntDuqKOaKN8WEqkHxMaFh5867tTJgeU7hUxMsnda6GY,2430
|
|
427
|
+
cognite_toolkit/_resources/cdf.toml,sha256=zGzMHHtMChwOWSI3UaxNDMrwpglXotfZrQaqVuX1tBo,475
|
|
428
|
+
cognite_toolkit/_version.py,sha256=0qgJZKjPWJ5p3y1R3oknCsIey5b4BLuDg9x76OvjeIE,23
|
|
429
429
|
cognite_toolkit/demo/__init__.py,sha256=-m1JoUiwRhNCL18eJ6t7fZOL7RPfowhCuqhYFtLgrss,72
|
|
430
430
|
cognite_toolkit/demo/_base.py,sha256=6xKBUQpXZXGQ3fJ5f7nj7oT0s2n7OTAGIa17ZlKHZ5U,8052
|
|
431
|
-
cognite_toolkit-0.7.
|
|
432
|
-
cognite_toolkit-0.7.
|
|
433
|
-
cognite_toolkit-0.7.
|
|
434
|
-
cognite_toolkit-0.7.
|
|
431
|
+
cognite_toolkit-0.7.73.dist-info/WHEEL,sha256=fAguSjoiATBe7TNBkJwOjyL1Tt4wwiaQGtNtjRPNMQA,80
|
|
432
|
+
cognite_toolkit-0.7.73.dist-info/entry_points.txt,sha256=EtZ17K2mUjh-AY0QNU1CPIB_aDSSOdmtNI_4Fj967mA,84
|
|
433
|
+
cognite_toolkit-0.7.73.dist-info/METADATA,sha256=90hbNfG8cEzWCXTAOpXTch7TGlEL2rr2IyH0Nwit_Ww,5026
|
|
434
|
+
cognite_toolkit-0.7.73.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|