cognite-neat 0.98.0__py3-none-any.whl → 0.99.0__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.
Potentially problematic release.
This version of cognite-neat might be problematic. Click here for more details.
- cognite/neat/_client/__init__.py +4 -0
- cognite/neat/_client/_api/data_modeling_loaders.py +512 -0
- cognite/neat/_client/_api/schema.py +50 -0
- cognite/neat/_client/_api_client.py +17 -0
- cognite/neat/_client/data_classes/__init__.py +0 -0
- cognite/neat/{_utils/cdf/data_classes.py → _client/data_classes/data_modeling.py} +8 -135
- cognite/neat/{_rules/models/dms/_schema.py → _client/data_classes/schema.py} +21 -281
- cognite/neat/_graph/_shared.py +14 -15
- cognite/neat/_graph/extractors/_classic_cdf/_assets.py +14 -154
- cognite/neat/_graph/extractors/_classic_cdf/_base.py +154 -7
- cognite/neat/_graph/extractors/_classic_cdf/_classic.py +23 -12
- cognite/neat/_graph/extractors/_classic_cdf/_data_sets.py +17 -92
- cognite/neat/_graph/extractors/_classic_cdf/_events.py +13 -162
- cognite/neat/_graph/extractors/_classic_cdf/_files.py +15 -179
- cognite/neat/_graph/extractors/_classic_cdf/_labels.py +32 -100
- cognite/neat/_graph/extractors/_classic_cdf/_relationships.py +27 -178
- cognite/neat/_graph/extractors/_classic_cdf/_sequences.py +14 -139
- cognite/neat/_graph/extractors/_classic_cdf/_timeseries.py +15 -173
- cognite/neat/_graph/extractors/_rdf_file.py +6 -7
- cognite/neat/_graph/queries/_base.py +17 -1
- cognite/neat/_graph/transformers/_classic_cdf.py +50 -134
- cognite/neat/_graph/transformers/_prune_graph.py +1 -1
- cognite/neat/_graph/transformers/_rdfpath.py +1 -1
- cognite/neat/_issues/warnings/__init__.py +6 -0
- cognite/neat/_issues/warnings/_external.py +8 -0
- cognite/neat/_issues/warnings/_properties.py +16 -0
- cognite/neat/_rules/_constants.py +7 -6
- cognite/neat/_rules/analysis/_base.py +8 -4
- cognite/neat/_rules/exporters/_base.py +3 -4
- cognite/neat/_rules/exporters/_rules2dms.py +29 -40
- cognite/neat/_rules/importers/_dms2rules.py +4 -5
- cognite/neat/_rules/importers/_rdf/_inference2rules.py +25 -33
- cognite/neat/_rules/models/__init__.py +1 -1
- cognite/neat/_rules/models/_base_rules.py +22 -12
- cognite/neat/_rules/models/dms/__init__.py +2 -2
- cognite/neat/_rules/models/dms/_exporter.py +15 -20
- cognite/neat/_rules/models/dms/_rules.py +48 -3
- cognite/neat/_rules/models/dms/_rules_input.py +52 -8
- cognite/neat/_rules/models/dms/_validation.py +10 -5
- cognite/neat/_rules/models/entities/_single_value.py +32 -4
- cognite/neat/_rules/models/information/_rules.py +0 -8
- cognite/neat/_rules/models/mapping/__init__.py +2 -3
- cognite/neat/_rules/models/mapping/_classic2core.py +36 -146
- cognite/neat/_rules/models/mapping/_classic2core.yaml +339 -0
- cognite/neat/_rules/transformers/__init__.py +2 -2
- cognite/neat/_rules/transformers/_converters.py +110 -11
- cognite/neat/_rules/transformers/_mapping.py +105 -30
- cognite/neat/_rules/transformers/_verification.py +5 -2
- cognite/neat/_session/_base.py +49 -8
- cognite/neat/_session/_drop.py +35 -0
- cognite/neat/_session/_inspect.py +17 -5
- cognite/neat/_session/_mapping.py +39 -0
- cognite/neat/_session/_prepare.py +218 -23
- cognite/neat/_session/_read.py +49 -12
- cognite/neat/_session/_to.py +3 -3
- cognite/neat/_store/_base.py +27 -24
- cognite/neat/_utils/rdf_.py +28 -1
- cognite/neat/_version.py +1 -1
- cognite/neat/_workflows/steps/lib/current/rules_exporter.py +8 -3
- cognite/neat/_workflows/steps/lib/current/rules_importer.py +4 -1
- cognite/neat/_workflows/steps/lib/current/rules_validator.py +3 -2
- {cognite_neat-0.98.0.dist-info → cognite_neat-0.99.0.dist-info}/METADATA +3 -3
- {cognite_neat-0.98.0.dist-info → cognite_neat-0.99.0.dist-info}/RECORD +67 -64
- cognite/neat/_rules/models/mapping/_base.py +0 -131
- cognite/neat/_utils/cdf/loaders/__init__.py +0 -25
- cognite/neat/_utils/cdf/loaders/_base.py +0 -54
- cognite/neat/_utils/cdf/loaders/_data_modeling.py +0 -339
- cognite/neat/_utils/cdf/loaders/_ingestion.py +0 -167
- /cognite/neat/{_utils/cdf → _client/_api}/__init__.py +0 -0
- {cognite_neat-0.98.0.dist-info → cognite_neat-0.99.0.dist-info}/LICENSE +0 -0
- {cognite_neat-0.98.0.dist-info → cognite_neat-0.99.0.dist-info}/WHEEL +0 -0
- {cognite_neat-0.98.0.dist-info → cognite_neat-0.99.0.dist-info}/entry_points.txt +0 -0
|
@@ -3,7 +3,7 @@ import sys
|
|
|
3
3
|
from abc import ABC, abstractmethod
|
|
4
4
|
from functools import total_ordering
|
|
5
5
|
from types import UnionType
|
|
6
|
-
from typing import Any, ClassVar, Generic, Literal, TypeVar, Union, cast, get_args, get_origin
|
|
6
|
+
from typing import Any, ClassVar, Generic, Literal, TypeVar, Union, cast, get_args, get_origin, overload
|
|
7
7
|
|
|
8
8
|
from cognite.client.data_classes.data_modeling import DirectRelationReference
|
|
9
9
|
from cognite.client.data_classes.data_modeling.data_types import UnitReference
|
|
@@ -22,6 +22,7 @@ from pydantic import (
|
|
|
22
22
|
model_validator,
|
|
23
23
|
)
|
|
24
24
|
|
|
25
|
+
from cognite.neat._issues.errors import NeatValueError
|
|
25
26
|
from cognite.neat._utils.text import replace_non_alphanumeric_with_underscore
|
|
26
27
|
|
|
27
28
|
if sys.version_info >= (3, 11):
|
|
@@ -56,14 +57,29 @@ class Entity(BaseModel, extra="ignore"):
|
|
|
56
57
|
suffix: str
|
|
57
58
|
|
|
58
59
|
@classmethod
|
|
59
|
-
|
|
60
|
+
@overload
|
|
61
|
+
def load(cls: "type[T_Entity]", data: Any, strict: Literal[True], **defaults) -> "T_Entity": ...
|
|
62
|
+
|
|
63
|
+
@classmethod
|
|
64
|
+
@overload
|
|
65
|
+
def load(
|
|
66
|
+
cls: "type[T_Entity]", data: Any, strict: Literal[False] = False, **defaults
|
|
67
|
+
) -> "T_Entity | UnknownEntity": ...
|
|
68
|
+
|
|
69
|
+
@classmethod
|
|
70
|
+
def load(cls: "type[T_Entity]", data: Any, strict: bool = False, **defaults) -> "T_Entity | UnknownEntity":
|
|
60
71
|
if isinstance(data, cls):
|
|
61
72
|
return data
|
|
62
73
|
elif isinstance(data, str) and data == str(Unknown):
|
|
74
|
+
if strict:
|
|
75
|
+
raise NeatValueError(f"Failed to load entity {data!s}")
|
|
63
76
|
return UnknownEntity(prefix=Undefined, suffix=Unknown)
|
|
64
77
|
if defaults and isinstance(defaults, dict):
|
|
65
78
|
# This is a trick to pass in default values
|
|
66
|
-
|
|
79
|
+
try:
|
|
80
|
+
return cls.model_validate({_PARSE: data, "defaults": defaults})
|
|
81
|
+
except ValueError:
|
|
82
|
+
raise
|
|
67
83
|
else:
|
|
68
84
|
return cls.model_validate(data)
|
|
69
85
|
|
|
@@ -291,9 +307,21 @@ class DMSEntity(Entity, Generic[T_ID], ABC):
|
|
|
291
307
|
defaults["prefix"] = defaults.pop("space")
|
|
292
308
|
return super().dump(**defaults)
|
|
293
309
|
|
|
310
|
+
@classmethod # type: ignore[override]
|
|
311
|
+
@overload
|
|
312
|
+
def load(cls: "type[T_DMSEntity]", data: Any, strict: Literal[True], **defaults) -> "T_DMSEntity": ...
|
|
313
|
+
|
|
314
|
+
@classmethod
|
|
315
|
+
@overload
|
|
316
|
+
def load(
|
|
317
|
+
cls: "type[T_DMSEntity]", data: Any, strict: Literal[False] = False, **defaults
|
|
318
|
+
) -> "T_DMSEntity | DMSUnknownEntity": ...
|
|
319
|
+
|
|
294
320
|
@classmethod
|
|
295
|
-
def load(cls: "type[T_DMSEntity]", data: Any, **defaults) -> "T_DMSEntity | DMSUnknownEntity": # type: ignore[override]
|
|
321
|
+
def load(cls: "type[T_DMSEntity]", data: Any, strict: bool = False, **defaults) -> "T_DMSEntity | DMSUnknownEntity": # type: ignore[override]
|
|
296
322
|
if isinstance(data, str) and data == str(Unknown):
|
|
323
|
+
if strict:
|
|
324
|
+
raise NeatValueError(f"Failed to load entity {data!s}")
|
|
297
325
|
return DMSUnknownEntity.from_id(None)
|
|
298
326
|
return cast(T_DMSEntity, super().load(data, **defaults))
|
|
299
327
|
|
|
@@ -14,9 +14,7 @@ from cognite.neat._rules._constants import EntityTypes
|
|
|
14
14
|
from cognite.neat._rules.models._base_rules import (
|
|
15
15
|
BaseMetadata,
|
|
16
16
|
BaseRules,
|
|
17
|
-
ClassRef,
|
|
18
17
|
DataModelAspect,
|
|
19
|
-
PropertyRef,
|
|
20
18
|
RoleTypes,
|
|
21
19
|
SheetList,
|
|
22
20
|
SheetRow,
|
|
@@ -103,9 +101,6 @@ class InformationClass(SheetRow):
|
|
|
103
101
|
)
|
|
104
102
|
return ",".join(str(value) for value in value)
|
|
105
103
|
|
|
106
|
-
def as_reference(self) -> ClassRef:
|
|
107
|
-
return ClassRef(Class=self.class_)
|
|
108
|
-
|
|
109
104
|
|
|
110
105
|
class InformationProperty(SheetRow):
|
|
111
106
|
"""
|
|
@@ -233,9 +228,6 @@ class InformationProperty(SheetRow):
|
|
|
233
228
|
isinstance(self.max_count, int | float) and self.max_count > 1
|
|
234
229
|
)
|
|
235
230
|
|
|
236
|
-
def as_reference(self) -> PropertyRef:
|
|
237
|
-
return PropertyRef(Class=self.class_, Property=self.property_)
|
|
238
|
-
|
|
239
231
|
|
|
240
232
|
class InformationRules(BaseRules):
|
|
241
233
|
metadata: InformationMetadata = Field(alias="Metadata")
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
from .
|
|
2
|
-
from ._classic2core import create_classic_to_core_mapping
|
|
1
|
+
from ._classic2core import load_classic_to_core_mapping
|
|
3
2
|
|
|
4
|
-
__all__ = ["
|
|
3
|
+
__all__ = ["load_classic_to_core_mapping"]
|
|
@@ -1,150 +1,40 @@
|
|
|
1
|
-
from
|
|
1
|
+
from functools import lru_cache
|
|
2
|
+
from pathlib import Path
|
|
2
3
|
|
|
4
|
+
import yaml
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
from cognite.neat._issues.errors import NeatValueError
|
|
7
|
+
from cognite.neat._rules._shared import ReadRules
|
|
8
|
+
from cognite.neat._rules.models.dms import DMSInputRules, DMSRules
|
|
6
9
|
|
|
10
|
+
_CLASSIC_TO_CORE_MAPPING = Path(__file__).resolve().parent / "_classic2core.yaml"
|
|
7
11
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
{
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
{
|
|
38
|
-
"destination": {"Class": "cdf_cdm:CogniteAsset", "Property": "tag"},
|
|
39
|
-
"source": {"Class": "classic:Asset", "Property": "labels"},
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"destination": {"Class": "cdf_cdm:DataProduct", "Property": "externalId"},
|
|
43
|
-
"source": {"Class": "classic:DataSet", "Property": "externalId"},
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"destination": {"Class": "cdf_cdm:DataProduct", "Property": "name"},
|
|
47
|
-
"source": {"Class": "classic:DataSet", "Property": "name"},
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"destination": {"Class": "cdf_cdm:DataProduct", "Property": "description"},
|
|
51
|
-
"source": {"Class": "classic:DataSet", "Property": "description"},
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"destination": {"Class": "cdf_cdm:DataProduct", "Property": "metadata"},
|
|
55
|
-
"source": {"Class": "classic:DataSet", "Property": "metadata"},
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"destination": {"Class": "cdf_cdm:DataProduct", "Property": "writeProtected"},
|
|
59
|
-
"source": {"Class": "classic:DataSet", "Property": "writeProtected"},
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"destination": {"Class": "cdf_cdm:CogniteActivity", "Property": "externalId"},
|
|
63
|
-
"source": {"Class": "classic:Event", "Property": "externalId"},
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"destination": {"Class": "cdf_cdm:CogniteSchedulable", "Property": "startTime"},
|
|
67
|
-
"source": {"Class": "classic:Event", "Property": "startTime"},
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"destination": {"Class": "cdf_cdm:CogniteSchedulable", "Property": "endTime"},
|
|
71
|
-
"source": {"Class": "classic:Event", "Property": "endTime"},
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"destination": {"Class": "cdf_cdm:CogniteActivity", "Property": "description"},
|
|
75
|
-
"source": {"Class": "classic:Event", "Property": "description"},
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"destination": {"Class": "cdf_cdm:CogniteActivity", "Property": "assets"},
|
|
79
|
-
"source": {"Class": "classic:Event", "Property": "assetIds"},
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"destination": {"Class": "cdf_cdm:CogniteSourceSystem", "Property": "name"},
|
|
83
|
-
"source": {"Class": "classic:Event", "Property": "source"},
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"destination": {"Class": "cdf_cdm:CogniteFile", "Property": "externalId"},
|
|
87
|
-
"source": {"Class": "classic:File", "Property": "externalId"},
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"destination": {"Class": "cdf_cdm:CogniteFile", "Property": "name"},
|
|
91
|
-
"source": {"Class": "classic:File", "Property": "name"},
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"destination": {"Class": "cdf_cdm:CogniteFile", "Property": "directory"},
|
|
95
|
-
"source": {"Class": "classic:File", "Property": "directory"},
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
"destination": {"Class": "cdf_cdm:CogniteSourceSystem", "Property": "name"},
|
|
99
|
-
"source": {"Class": "classic:File", "Property": "source"},
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"destination": {"Class": "cdf_cdm:CogniteFile", "Property": "mimeType"},
|
|
103
|
-
"source": {"Class": "classic:File", "Property": "mimeType"},
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"destination": {"Class": "cdf_cdm:CogniteFile", "Property": "assets"},
|
|
107
|
-
"source": {"Class": "classic:File", "Property": "assetIds"},
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
"destination": {"Class": "cdf_cdm:CogniteFile", "Property": "sourceCreatedTime"},
|
|
111
|
-
"source": {"Class": "classic:File", "Property": "sourceCreatedTime"},
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"destination": {"Class": "cdf_cdm:CogniteFile", "Property": "sourceUpdatedTime"},
|
|
115
|
-
"source": {"Class": "classic:File", "Property": "sourceModifiedTime"},
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
"destination": {"Class": "cdf_cdm:CogniteTimeSeries", "Property": "externalId"},
|
|
119
|
-
"source": {"Class": "classic:TimeSeries", "Property": "externalId"},
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
"destination": {"Class": "cdf_cdm:CogniteTimeSeries", "Property": "name"},
|
|
123
|
-
"source": {"Class": "classic:TimeSeries", "Property": "name"},
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
"destination": {"Class": "cdf_cdm:CogniteTimeSeries", "Property": "type"},
|
|
127
|
-
"source": {"Class": "classic:TimeSeries", "Property": "isString"},
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
"destination": {"Class": "cdf_cdm:CogniteTimeSeries", "Property": "sourceUnit"},
|
|
131
|
-
"source": {"Class": "classic:TimeSeries", "Property": "unit"},
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
"destination": {"Class": "cdf_cdm:CogniteTimeSeries", "Property": "unit"},
|
|
135
|
-
"source": {"Class": "classic:TimeSeries", "Property": "unitExternalId"},
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"destination": {"Class": "cdf_cdm:CogniteTimeSeries", "Property": "assets"},
|
|
139
|
-
"source": {"Class": "classic:TimeSeries", "Property": "assetId"},
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"destination": {"Class": "cdf_cdm:CogniteTimeSeries", "Property": "isStep"},
|
|
143
|
-
"source": {"Class": "classic:TimeSeries", "Property": "isStep"},
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"destination": {"Class": "cdf_cdm:CogniteTimeSeries", "Property": "description"},
|
|
147
|
-
"source": {"Class": "classic:TimeSeries", "Property": "description"},
|
|
148
|
-
},
|
|
149
|
-
],
|
|
150
|
-
}
|
|
12
|
+
|
|
13
|
+
@lru_cache(maxsize=1)
|
|
14
|
+
def _read_source_file() -> str:
|
|
15
|
+
return _CLASSIC_TO_CORE_MAPPING.read_text()
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def load_classic_to_core_mapping(org_name: str, source_space: str, source_version: str) -> DMSRules:
|
|
19
|
+
if not org_name:
|
|
20
|
+
raise NeatValueError("Organization name must be provided.")
|
|
21
|
+
|
|
22
|
+
from cognite.neat._rules.importers import YAMLImporter
|
|
23
|
+
from cognite.neat._rules.transformers import VerifyDMSRules
|
|
24
|
+
|
|
25
|
+
raw_str = _read_source_file().replace("Classic", org_name)
|
|
26
|
+
|
|
27
|
+
loaded = yaml.safe_load(raw_str)
|
|
28
|
+
loaded["metadata"]["space"] = source_space
|
|
29
|
+
loaded["metadata"]["version"] = source_version
|
|
30
|
+
|
|
31
|
+
read: ReadRules[DMSInputRules] = YAMLImporter(loaded).to_rules()
|
|
32
|
+
if not isinstance(read.rules, DMSInputRules):
|
|
33
|
+
raise NeatValueError(f"Expected DMS rules, but got {type(read.rules).__name__}")
|
|
34
|
+
|
|
35
|
+
verified = VerifyDMSRules(errors="raise", post_validate=False).transform(read)
|
|
36
|
+
|
|
37
|
+
if verified.rules is None:
|
|
38
|
+
raise NeatValueError("Failed to verify the rules.")
|
|
39
|
+
|
|
40
|
+
return verified.rules
|
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
enum:
|
|
2
|
+
- collection: timeseriesType
|
|
3
|
+
description: Time series with double floating point data points.
|
|
4
|
+
name: numeric
|
|
5
|
+
value: numeric
|
|
6
|
+
- collection: timeseriesType
|
|
7
|
+
description: Time series with string data points.
|
|
8
|
+
name: string
|
|
9
|
+
value: string
|
|
10
|
+
metadata:
|
|
11
|
+
created: '2024-08-29T13:49:56.696000'
|
|
12
|
+
creator: Anders Albert,Nikola Vasiljevic,Thorkild Stray
|
|
13
|
+
description: Mapping from Classic to Core
|
|
14
|
+
external_id: ClassicCoreMapping
|
|
15
|
+
name: data_product data model
|
|
16
|
+
role: DMS Architect
|
|
17
|
+
space: mapping
|
|
18
|
+
updated: '2024-08-29T13:49:56.696000'
|
|
19
|
+
version: v1.0
|
|
20
|
+
properties:
|
|
21
|
+
- container: cdf_cdm:CogniteDescribable
|
|
22
|
+
container_property: description
|
|
23
|
+
description: Description of the instance
|
|
24
|
+
immutable: false
|
|
25
|
+
is_list: false
|
|
26
|
+
nullable: true
|
|
27
|
+
value_type: text
|
|
28
|
+
view: ClassicAsset
|
|
29
|
+
view_property: description
|
|
30
|
+
- container: cdf_cdm:CogniteDescribable
|
|
31
|
+
container_property: tags
|
|
32
|
+
description: Text based labels for generic use, limited to 1000
|
|
33
|
+
immutable: false
|
|
34
|
+
is_list: true
|
|
35
|
+
nullable: true
|
|
36
|
+
value_type: text
|
|
37
|
+
view: ClassicAsset
|
|
38
|
+
view_property: labels
|
|
39
|
+
- container: cdf_cdm:CogniteDescribable
|
|
40
|
+
container_property: name
|
|
41
|
+
description: Name of the instance
|
|
42
|
+
immutable: false
|
|
43
|
+
index: name
|
|
44
|
+
is_list: false
|
|
45
|
+
nullable: true
|
|
46
|
+
value_type: text
|
|
47
|
+
view: ClassicAsset
|
|
48
|
+
view_property: name
|
|
49
|
+
- connection: direct
|
|
50
|
+
container: cdf_cdm:CogniteAsset
|
|
51
|
+
container_property: assetHierarchy_parent
|
|
52
|
+
description: The parent of the asset.
|
|
53
|
+
immutable: false
|
|
54
|
+
is_list: false
|
|
55
|
+
name: Parent
|
|
56
|
+
nullable: true
|
|
57
|
+
value_type: ClassicAsset
|
|
58
|
+
view: ClassicAsset
|
|
59
|
+
view_property: parentId
|
|
60
|
+
- connection: direct
|
|
61
|
+
container: cdf_cdm:CogniteSourceable
|
|
62
|
+
container_property: source
|
|
63
|
+
description: Direct relation to a source system
|
|
64
|
+
immutable: false
|
|
65
|
+
index: source
|
|
66
|
+
is_list: false
|
|
67
|
+
nullable: true
|
|
68
|
+
value_type: cdf_cdm:SourceSystem(version=v1)
|
|
69
|
+
view: ClassicAsset
|
|
70
|
+
view_property: source
|
|
71
|
+
- container: cdf_cdm:CogniteDescribable
|
|
72
|
+
container_property: aliases
|
|
73
|
+
description: Alternative names for the node
|
|
74
|
+
immutable: false
|
|
75
|
+
is_list: true
|
|
76
|
+
nullable: true
|
|
77
|
+
value_type: text
|
|
78
|
+
view: ClassicEvent
|
|
79
|
+
view_property: aliases
|
|
80
|
+
- connection: direct
|
|
81
|
+
container: cdf_cdm:CogniteActivity
|
|
82
|
+
container_property: assets
|
|
83
|
+
description: A list of assets the activity is related to.
|
|
84
|
+
immutable: false
|
|
85
|
+
is_list: true
|
|
86
|
+
name: Assets
|
|
87
|
+
nullable: true
|
|
88
|
+
value_type: ClassicAsset
|
|
89
|
+
view: ClassicEvent
|
|
90
|
+
view_property: assetIds
|
|
91
|
+
- container: cdf_cdm:CogniteDescribable
|
|
92
|
+
container_property: description
|
|
93
|
+
description: Description of the instance
|
|
94
|
+
immutable: false
|
|
95
|
+
is_list: false
|
|
96
|
+
nullable: true
|
|
97
|
+
value_type: text
|
|
98
|
+
view: ClassicEvent
|
|
99
|
+
view_property: description
|
|
100
|
+
- container: cdf_cdm:CogniteSchedulable
|
|
101
|
+
container_property: endTime
|
|
102
|
+
description: The actual end time of an activity (or similar that extends this)
|
|
103
|
+
immutable: false
|
|
104
|
+
index: endTime
|
|
105
|
+
is_list: false
|
|
106
|
+
nullable: true
|
|
107
|
+
value_type: timestamp
|
|
108
|
+
view: ClassicEvent
|
|
109
|
+
view_property: endTime
|
|
110
|
+
- container: cdf_cdm:CogniteDescribable
|
|
111
|
+
container_property: tags
|
|
112
|
+
description: Text based labels for generic use, limited to 1000
|
|
113
|
+
immutable: false
|
|
114
|
+
is_list: true
|
|
115
|
+
nullable: true
|
|
116
|
+
value_type: text
|
|
117
|
+
view: ClassicEvent
|
|
118
|
+
view_property: labels
|
|
119
|
+
- connection: direct
|
|
120
|
+
container: cdf_cdm:CogniteSourceable
|
|
121
|
+
container_property: source
|
|
122
|
+
description: Direct relation to a source system
|
|
123
|
+
immutable: false
|
|
124
|
+
index: source
|
|
125
|
+
is_list: false
|
|
126
|
+
nullable: true
|
|
127
|
+
value_type: cdf_cdm:SourceSystem(version=v1)
|
|
128
|
+
view: ClassicEvent
|
|
129
|
+
view_property: source
|
|
130
|
+
- container: cdf_cdm:CogniteSchedulable
|
|
131
|
+
container_property: startTime
|
|
132
|
+
description: The actual start time of an activity (or similar that extends this)
|
|
133
|
+
immutable: false
|
|
134
|
+
index: startTime
|
|
135
|
+
is_list: false
|
|
136
|
+
nullable: true
|
|
137
|
+
value_type: timestamp
|
|
138
|
+
view: ClassicEvent
|
|
139
|
+
view_property: startTime
|
|
140
|
+
- connection: direct
|
|
141
|
+
container: cdf_cdm:CogniteFile
|
|
142
|
+
container_property: assets
|
|
143
|
+
description: A list of assets this file is related to.
|
|
144
|
+
immutable: false
|
|
145
|
+
is_list: true
|
|
146
|
+
name: Assets
|
|
147
|
+
nullable: true
|
|
148
|
+
value_type: ClassicAsset
|
|
149
|
+
view: ClassicFile
|
|
150
|
+
view_property: assetIds
|
|
151
|
+
- container: cdf_cdm:CogniteFile
|
|
152
|
+
container_property: directory
|
|
153
|
+
description: Contains the path elements from the source (if the source system has
|
|
154
|
+
a file system hierarchy or similar.)
|
|
155
|
+
immutable: false
|
|
156
|
+
is_list: false
|
|
157
|
+
name: Directory
|
|
158
|
+
nullable: true
|
|
159
|
+
value_type: text
|
|
160
|
+
view: ClassicFile
|
|
161
|
+
view_property: directory
|
|
162
|
+
- container: cdf_cdm:CogniteDescribable
|
|
163
|
+
container_property: tags
|
|
164
|
+
description: Text based labels for generic use, limited to 1000
|
|
165
|
+
immutable: false
|
|
166
|
+
is_list: true
|
|
167
|
+
nullable: true
|
|
168
|
+
value_type: text
|
|
169
|
+
view: ClassicFile
|
|
170
|
+
view_property: labels
|
|
171
|
+
- container: cdf_cdm:CogniteFile
|
|
172
|
+
container_property: mimeType
|
|
173
|
+
description: The MIME type of the file.
|
|
174
|
+
immutable: false
|
|
175
|
+
is_list: false
|
|
176
|
+
name: MIME type
|
|
177
|
+
nullable: true
|
|
178
|
+
value_type: text
|
|
179
|
+
view: ClassicFile
|
|
180
|
+
view_property: mimeType
|
|
181
|
+
- container: cdf_cdm:CogniteDescribable
|
|
182
|
+
container_property: name
|
|
183
|
+
description: Name of the instance
|
|
184
|
+
immutable: false
|
|
185
|
+
index: name
|
|
186
|
+
is_list: false
|
|
187
|
+
nullable: true
|
|
188
|
+
value_type: text
|
|
189
|
+
view: ClassicFile
|
|
190
|
+
view_property: name
|
|
191
|
+
- connection: direct
|
|
192
|
+
container: cdf_cdm:CogniteSourceable
|
|
193
|
+
container_property: source
|
|
194
|
+
description: Direct relation to a source system
|
|
195
|
+
immutable: false
|
|
196
|
+
index: source
|
|
197
|
+
is_list: false
|
|
198
|
+
nullable: true
|
|
199
|
+
value_type: cdf_cdm:SourceSystem(version=v1)
|
|
200
|
+
view: ClassicFile
|
|
201
|
+
view_property: source
|
|
202
|
+
- container: cdf_cdm:CogniteSourceable
|
|
203
|
+
container_property: sourceCreatedTime
|
|
204
|
+
description: When the instance was created in source system (if available)
|
|
205
|
+
immutable: false
|
|
206
|
+
index: sourceCreatedTime
|
|
207
|
+
is_list: false
|
|
208
|
+
nullable: true
|
|
209
|
+
value_type: timestamp
|
|
210
|
+
view: ClassicFile
|
|
211
|
+
view_property: sourceCreatedTime
|
|
212
|
+
- container: cdf_cdm:CogniteSourceable
|
|
213
|
+
container_property: sourceUpdatedTime
|
|
214
|
+
description: When the instance was last updated in the source system (if available)
|
|
215
|
+
immutable: false
|
|
216
|
+
index: sourceUpdatedTime
|
|
217
|
+
is_list: false
|
|
218
|
+
nullable: true
|
|
219
|
+
value_type: timestamp
|
|
220
|
+
view: ClassicFile
|
|
221
|
+
view_property: sourceModifiedTime
|
|
222
|
+
- connection: direct
|
|
223
|
+
container: cdf_cdm:CogniteTimeSeries
|
|
224
|
+
container_property: assets
|
|
225
|
+
description: A list of assets the time series is related to.
|
|
226
|
+
immutable: false
|
|
227
|
+
is_list: true
|
|
228
|
+
name: Assets
|
|
229
|
+
nullable: true
|
|
230
|
+
value_type: ClassicAsset
|
|
231
|
+
view: ClassicTimeSeries
|
|
232
|
+
view_property: assetId
|
|
233
|
+
- container: cdf_cdm:CogniteDescribable
|
|
234
|
+
container_property: description
|
|
235
|
+
description: Description of the instance
|
|
236
|
+
immutable: false
|
|
237
|
+
is_list: false
|
|
238
|
+
nullable: true
|
|
239
|
+
value_type: text
|
|
240
|
+
view: ClassicTimeSeries
|
|
241
|
+
view_property: description
|
|
242
|
+
- container: cdf_cdm:CogniteTimeSeries
|
|
243
|
+
container_property: isStep
|
|
244
|
+
default: 0
|
|
245
|
+
description: Specifies whether the time series is a step time series or not.
|
|
246
|
+
immutable: false
|
|
247
|
+
is_list: false
|
|
248
|
+
name: Is step
|
|
249
|
+
nullable: false
|
|
250
|
+
value_type: boolean
|
|
251
|
+
view: ClassicTimeSeries
|
|
252
|
+
view_property: isStep
|
|
253
|
+
- container: cdf_cdm:CogniteTimeSeries
|
|
254
|
+
container_property: type
|
|
255
|
+
description: Specifies the data type of the data points.
|
|
256
|
+
immutable: true
|
|
257
|
+
is_list: false
|
|
258
|
+
name: Type
|
|
259
|
+
nullable: false
|
|
260
|
+
value_type: enum(collection=timeseriesType)
|
|
261
|
+
view: ClassicTimeSeries
|
|
262
|
+
view_property: isString
|
|
263
|
+
- container: cdf_cdm:CogniteDescribable
|
|
264
|
+
container_property: aliases
|
|
265
|
+
description: Alternative names for the node
|
|
266
|
+
immutable: false
|
|
267
|
+
is_list: true
|
|
268
|
+
nullable: true
|
|
269
|
+
value_type: text
|
|
270
|
+
view: ClassicTimeSeries
|
|
271
|
+
view_property: legacyName
|
|
272
|
+
- container: cdf_cdm:CogniteDescribable
|
|
273
|
+
container_property: name
|
|
274
|
+
description: Name of the instance
|
|
275
|
+
immutable: false
|
|
276
|
+
index: name
|
|
277
|
+
is_list: false
|
|
278
|
+
nullable: true
|
|
279
|
+
value_type: text
|
|
280
|
+
view: ClassicTimeSeries
|
|
281
|
+
view_property: name
|
|
282
|
+
- container: cdf_cdm:CogniteDescribable
|
|
283
|
+
container_property: tags
|
|
284
|
+
description: Text based labels for generic use, limited to 1000
|
|
285
|
+
immutable: false
|
|
286
|
+
is_list: true
|
|
287
|
+
nullable: true
|
|
288
|
+
value_type: text
|
|
289
|
+
view: ClassicTimeSeries
|
|
290
|
+
view_property: securityCategories
|
|
291
|
+
- container: cdf_cdm:CogniteTimeSeries
|
|
292
|
+
container_property: sourceUnit
|
|
293
|
+
description: The unit specified in the source system.
|
|
294
|
+
immutable: false
|
|
295
|
+
is_list: false
|
|
296
|
+
name: Source unit
|
|
297
|
+
nullable: true
|
|
298
|
+
value_type: text
|
|
299
|
+
view: ClassicTimeSeries
|
|
300
|
+
view_property: unit
|
|
301
|
+
- connection: direct
|
|
302
|
+
container: cdf_cdm:CogniteTimeSeries
|
|
303
|
+
container_property: unit
|
|
304
|
+
description: The unit of the time series.
|
|
305
|
+
immutable: false
|
|
306
|
+
is_list: false
|
|
307
|
+
name: Unit
|
|
308
|
+
nullable: true
|
|
309
|
+
value_type: Unit
|
|
310
|
+
view: ClassicTimeSeries
|
|
311
|
+
view_property: unitExternalId
|
|
312
|
+
views:
|
|
313
|
+
- description: The CogniteSourceSystem core concept is used to standardize the way
|
|
314
|
+
source system is stored.
|
|
315
|
+
implements: cdf_cdm:CogniteDescribable(version=v1)
|
|
316
|
+
in_model: true
|
|
317
|
+
view: cdf_cdm:CogniteSourceSystem(version=v1)
|
|
318
|
+
- description: Assets represent systems that support industrial functions or processes.
|
|
319
|
+
Assets are often called 'functional location'.
|
|
320
|
+
implements: cdf_cdm:CogniteAsset(version=v1)
|
|
321
|
+
in_model: true
|
|
322
|
+
name: Asset
|
|
323
|
+
view: ClassicAsset
|
|
324
|
+
- description: Represents activities. Activities typically happen over a period and
|
|
325
|
+
have a start and end time.
|
|
326
|
+
implements: cdf_cdm:CogniteActivity(version=v1)
|
|
327
|
+
in_model: true
|
|
328
|
+
name: Activity
|
|
329
|
+
view: ClassicEvent
|
|
330
|
+
- description: Represents files.
|
|
331
|
+
implements: cdf_cdm:CogniteFile(version=v1)
|
|
332
|
+
in_model: true
|
|
333
|
+
name: File
|
|
334
|
+
view: ClassicFile
|
|
335
|
+
- description: Represents a series of data points in time order.
|
|
336
|
+
implements: cdf_cdm:CogniteTimeSeries(version=v1)
|
|
337
|
+
in_model: true
|
|
338
|
+
name: Time series
|
|
339
|
+
view: ClassicTimeSeries
|
|
@@ -3,6 +3,7 @@ from ._converters import (
|
|
|
3
3
|
ConvertToRules,
|
|
4
4
|
DMSToInformation,
|
|
5
5
|
InformationToDMS,
|
|
6
|
+
PrefixEntities,
|
|
6
7
|
ReduceCogniteModel,
|
|
7
8
|
SetIDDMSModel,
|
|
8
9
|
ToCompliantEntities,
|
|
@@ -17,9 +18,8 @@ __all__ = [
|
|
|
17
18
|
"RulesTransformer",
|
|
18
19
|
"RulesPipeline",
|
|
19
20
|
"InformationToDMS",
|
|
20
|
-
"InformationToAsset",
|
|
21
21
|
"ConvertToRules",
|
|
22
|
-
"
|
|
22
|
+
"PrefixEntities",
|
|
23
23
|
"DMSToInformation",
|
|
24
24
|
"VerifyDMSRules",
|
|
25
25
|
"VerifyInformationRules",
|