Data Modeling

Data Models

Retrieve data models by id(s)

DataModelsAPI.retrieve(ids: cognite.client.data_classes.data_modeling.ids.DataModelId | tuple[str, str] | tuple[str, str, str] | collections.abc.Sequence[cognite.client.data_classes.data_modeling.ids.DataModelId | tuple[str, str] | tuple[str, str, str]], inline_views: Literal[True]) DataModelList[View]
DataModelsAPI.retrieve(ids: cognite.client.data_classes.data_modeling.ids.DataModelId | tuple[str, str] | tuple[str, str, str] | collections.abc.Sequence[cognite.client.data_classes.data_modeling.ids.DataModelId | tuple[str, str] | tuple[str, str, str]], inline_views: Literal[False] = False) DataModelList[ViewId]

Retrieve data_model(s) by id(s).

Parameters
  • ids (DataModelIdentifier | Sequence[DataModelIdentifier]) – Data Model identifier(s).

  • inline_views (bool) – Whether to expand the referenced views inline in the returned result.

Returns

Requested data model(s) or empty if none exist.

Return type

DataModelList[ViewId] | DataModelList[View]

Examples

>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> res = client.data_modeling.data_models.retrieve(("mySpace", "myDataModel", "v1"))

List data models

DataModelsAPI.list(inline_views: Literal[True], limit: int | None = DATA_MODELING_DEFAULT_LIMIT_READ, space: str | None = None, all_versions: bool = False, include_global: bool = False) DataModelList[View]
DataModelsAPI.list(inline_views: Literal[False] = False, limit: int | None = DATA_MODELING_DEFAULT_LIMIT_READ, space: str | None = None, all_versions: bool = False, include_global: bool = False) DataModelList[ViewId]

List data models

Parameters
  • inline_views (bool) – Whether to expand the referenced views inline in the returned result.

  • limit (int | None) – Maximum number of data model to return. Defaults to 10. Set to -1, float(“inf”) or None to return all items.

  • space (str | None) – The space to query.

  • all_versions (bool) – Whether to return all versions. If false, only the newest version is returned, which is determined based on the ‘createdTime’ field.

  • include_global (bool) – Whether to include global data models.

Returns

List of requested data models

Return type

DataModelList[View] | DataModelList[ViewId]

Examples

List 5 data model:

>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> data_model_list = client.data_modeling.data_models.list(limit=5)

Iterate over data model:

>>> for data_model in client.data_modeling.data_models:
...     data_model # do something with the data_model

Iterate over chunks of data model to reduce memory load:

>>> for data_model_list in client.data_modeling.data_models(chunk_size=10):
...     data_model_list # do something with the data model

Apply data models

DataModelsAPI.apply(data_model: Sequence[DataModelApply]) DataModelList
DataModelsAPI.apply(data_model: DataModelApply) DataModel

Create or update one or more data model.

Parameters

data_model (DataModelApply | Sequence[DataModelApply]) – Data model(s) to create or update (upsert).

Returns

Created data model(s)

Return type

DataModel | DataModelList

Examples

Create new data model:

>>> from cognite.client import CogniteClient
>>> from cognite.client.data_classes.data_modeling import DataModelApply, ViewId
>>> client = CogniteClient()
>>> data_models = [
...     DataModelApply(space="mySpace",external_id="myDataModel",version="v1",views=[ViewId("mySpace","myView","v1")]),
...     DataModelApply(space="mySpace",external_id="myOtherDataModel",version="v1",views=[ViewId("mySpace","myView","v1")])]
>>> res = client.data_modeling.data_models.apply(data_models)

Delete data models

DataModelsAPI.delete(ids: cognite.client.data_classes.data_modeling.ids.DataModelId | tuple[str, str] | tuple[str, str, str] | collections.abc.Sequence[cognite.client.data_classes.data_modeling.ids.DataModelId | tuple[str, str] | tuple[str, str, str]]) list[cognite.client.data_classes.data_modeling.ids.DataModelId]

Delete one or more data model

Parameters

ids (DataModelIdentifier | Sequence[DataModelIdentifier]) – Data Model identifier(s).

Returns

The data_model(s) which has been deleted. None if nothing was deleted.

Return type

list[DataModelId]

Examples

Delete data model by id:

>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> client.data_modeling.data_models.delete(("mySpace", "myDataModel", "v1"))

Data model data classes

class cognite.client.data_classes.data_modeling.data_models.DataModel(space: str, external_id: str, version: str, is_global: bool, last_updated_time: int, created_time: int, description: str | None, name: str | None, views: list[T_View] | None)

Bases: DataModelCore, Generic[T_View]

A group of views. This is the read version of a Data Model

Parameters
  • space (str) – The workspace for the data model, a unique identifier for the space.

  • external_id (str) – Combined with the space is the unique identifier of the data model.

  • version (str) – DMS version.

  • is_global (bool) – Whether this is a global data model.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • description (str | None) – Textual description of the data model

  • name (str | None) – Human readable name for the data model.

  • views (list[T_View] | None) – List of views included in this data model.

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.data_models.DataModelApply(space: str, external_id: str, version: str, description: Optional[str] = None, name: Optional[str] = None, views: Optional[Sequence[cognite.client.data_classes.data_modeling.ids.ViewId | cognite.client.data_classes.data_modeling.views.ViewApply]] = None)

Bases: DataModelCore

A group of views. This is the write version of a Data Model.

Parameters
  • space (str) – The workspace for the data model, a unique identifier for the space.

  • external_id (str) – Combined with the space is the unique identifier of the data model.

  • version (str) – DMS version.

  • description (str | None) – Textual description of the data model

  • name (str | None) – Human readable name for the data model.

  • views (Sequence[ViewId | ViewApply] | None) – List of views included in this data model.

as_write() DataModelApply

Returns this DataModelApply instance.

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.data_models.DataModelApplyList(resources: Iterable[Any], cognite_client: CogniteClient | None = None)

Bases: CogniteResourceList[DataModelApply]

as_ids() list[cognite.client.data_classes.data_modeling.ids.DataModelId]

Convert the list of data models to a list of data model ids.

Returns

The list of data model ids.

Return type

list[DataModelId]

class cognite.client.data_classes.data_modeling.data_models.DataModelCore(space: str, external_id: str, version: str, description: str | None, name: str | None)

Bases: DataModelingSchemaResource[DataModelApply], ABC

A group of views.

Parameters
  • space (str) – The workspace for the data model, a unique identifier for the space.

  • external_id (str) – Combined with the space is the unique identifier of the data model.

  • version (str) – DMS version.

  • description (str | None) – Textual description of the data model

  • name (str | None) – Human readable name for the data model.

class cognite.client.data_classes.data_modeling.data_models.DataModelFilter(space: Optional[str] = None, inline_views: bool = False, all_versions: bool = False, include_global: bool = False)

Bases: CogniteFilter

Represent the filer arguments for the list endpoint.

Parameters
  • space (str | None) – The space to query

  • inline_views (bool) – Whether to expand the referenced views inline in the returned result.

  • all_versions (bool) – Whether to return all versions. If false, only the newest version is returned, which is determined based on the ‘createdTime’ field.

  • include_global (bool) – Whether to include global views.

class cognite.client.data_classes.data_modeling.data_models.DataModelList(resources: Iterable[Any], cognite_client: CogniteClient | None = None)

Bases: WriteableCogniteResourceList[DataModelApply, DataModel[T_View]]

as_apply() DataModelApplyList

Convert the list of data models to a list of data model applies.

Returns

The list of data model applies.

Return type

DataModelApplyList

as_ids() list[cognite.client.data_classes.data_modeling.ids.DataModelId]

Convert the list of data models to a list of data model ids.

Returns

The list of data model ids.

Return type

list[DataModelId]

latest_version(key: Literal['created_time', 'last_updated_time'] = 'created_time') DataModel[T_View]

Get the data model in the list with the latest version. The latest version is determined based on the created_time or last_updated_time field.

Parameters

key (Literal['created_time', 'last_updated_time']) – The field to use for determining the latest version.

Returns

The data model with the latest version.

Return type

DataModel[T_View]

class cognite.client.data_classes.data_modeling.data_models.DataModelsSort(property: Literal['space', 'external_id', 'name', 'description', 'version', 'created_time', 'last_updated_time'], direction: Literal['ascending', 'descending'] = 'ascending', nulls_first: bool = False)

Bases: DataModelingSort

Spaces

Retrieve a space by id

SpacesAPI.retrieve(spaces: str) cognite.client.data_classes.data_modeling.spaces.Space | None
SpacesAPI.retrieve(spaces: SequenceNotStr[str]) SpaceList

Retrieve one or more spaces.

Parameters

spaces (str | SequenceNotStr[str]) – Space ID

Returns

Requested space or None if it does not exist.

Return type

Space | SpaceList | None

Examples

>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> res = client.data_modeling.spaces.retrieve(spaces='mySpace')

Get multiple spaces by id:

>>> res = client.data_modeling.spaces.retrieve(spaces=["MySpace", "MyAwesomeSpace", "MyOtherSpace"])

List spaces

SpacesAPI.list(limit: int | None = 25, include_global: bool = False) SpaceList

List spaces

Parameters
  • limit (int | None) – Maximum number of spaces to return. Defaults to 10. Set to -1, float(“inf”) or None to return all items.

  • include_global (bool) – Whether to include global spaces. Defaults to False.

Returns

List of requested spaces

Return type

SpaceList

Examples

List spaces and filter on max start time:

>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> space_list = client.data_modeling.spaces.list(limit=5)

Iterate over spaces:

>>> for space in client.data_modeling.spaces:
...     space # do something with the space

Iterate over chunks of spaces to reduce memory load:

>>> for space_list in client.data_modeling.spaces(chunk_size=2500):
...     space_list # do something with the spaces

Apply spaces

SpacesAPI.apply(spaces: Sequence[SpaceApply]) SpaceList
SpacesAPI.apply(spaces: SpaceApply) Space

Create or patch one or more spaces.

Parameters

spaces (SpaceApply | Sequence[SpaceApply]) – Space | Sequence[Space]): Space or spaces of spacesda to create or update.

Returns

Created space(s)

Return type

Space | SpaceList

Examples

Create new spaces:

>>> from cognite.client import CogniteClient
>>> from cognite.client.data_classes.data_modeling import SpaceApply
>>> client = CogniteClient()
>>> spaces = [SpaceApply(space="mySpace", description="My first space", name="My Space"),
... SpaceApply(space="myOtherSpace", description="My second space", name="My Other Space")]
>>> res = client.data_modeling.spaces.apply(spaces)

Delete spaces

SpacesAPI.delete(spaces: Union[str, SequenceNotStr[str]]) list[str]

Delete one or more spaces

Parameters

spaces (str | SequenceNotStr[str]) – ID or ID list ids of spaces.

Returns

The space(s) which has been deleted.

Return type

list[str]

Examples

Delete spaces by id:

>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> client.data_modeling.spaces.delete(spaces=["mySpace", "myOtherSpace"])

Data classes

class cognite.client.data_classes.data_modeling.spaces.Space(space: str, is_global: bool, last_updated_time: int, created_time: int, description: Optional[str] = None, name: Optional[str] = None)

Bases: SpaceCore

A workspace for data models and instances. This is the read version.

Parameters
  • space (str) – A unique identifier for the space.

  • is_global (bool) – Whether the space is global or not.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • description (str | None) – Textual description of the space

  • name (str | None) – Human readable name for the space.

class cognite.client.data_classes.data_modeling.spaces.SpaceApply(space: str, description: Optional[str] = None, name: Optional[str] = None)

Bases: SpaceCore

A workspace for data models and instances. This is the write version

Parameters
  • space (str) – A unique identifier for the space.

  • description (str | None) – Textual description of the space

  • name (str | None) – Human readable name for the space.

as_write() SpaceApply

Returns this SpaceApply instance.

class cognite.client.data_classes.data_modeling.spaces.SpaceApplyList(resources: Iterable[Any], cognite_client: CogniteClient | None = None)

Bases: CogniteResourceList[SpaceApply]

as_ids() list[str]

Converts all the spaces to a space id list.

Returns

A list of space ids.

Return type

list[str]

class cognite.client.data_classes.data_modeling.spaces.SpaceCore(space: str, description: str | None, name: str | None)

Bases: WritableDataModelingResource[SpaceApply], ABC

A workspace for data models and instances.

Parameters
  • space (str) – A unique identifier for the space.

  • description (str | None) – Textual description of the space

  • name (str | None) – Human readable name for the space.

class cognite.client.data_classes.data_modeling.spaces.SpaceList(resources: Iterable[Any], cognite_client: CogniteClient | None = None)

Bases: WriteableCogniteResourceList[SpaceApply, Space]

as_apply() SpaceApplyList

Converts all the spaces to a space apply list.

Returns

A list of space applies.

Return type

SpaceApplyList

as_ids() list[str]

Converts all the spaces to a space id list.

Returns

A list of space ids.

Return type

list[str]

extend(other: Iterable[Any]) None

S.extend(iterable) – extend sequence by appending elements from the iterable

get(space: str) cognite.client.data_classes.data_modeling.spaces.Space | None

Get a space object from this list by space ID.

Parameters

space (str) – The space identifier to get.

Returns

The requested space if present, else None

Return type

Space | None

Views

Retrieve views by id(s)

ViewsAPI.retrieve(ids: cognite.client.data_classes.data_modeling.ids.ViewId | tuple[str, str] | tuple[str, str, str] | collections.abc.Sequence[cognite.client.data_classes.data_modeling.ids.ViewId | tuple[str, str] | tuple[str, str, str]], include_inherited_properties: bool = True, all_versions: bool = True) ViewList

Retrieve a single view by id.

Parameters
  • ids (ViewIdentifier | Sequence[ViewIdentifier]) – The view identifier(s). This can be given as a tuple of strings or a ViewId object. For example, (“my_space”, “my_view”), (“my_space”, “my_view”, “my_version”), or ViewId(“my_space”, “my_view”, “my_version”). Note that version is optional, if not provided, all versions will be returned.

  • include_inherited_properties (bool) – Whether to include properties inherited from views this view implements.

  • all_versions (bool) – Whether to return all versions. If false, only the newest version is returned,

Returns

Requested view or None if it does not exist.

Return type

ViewList

Examples

>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> res = client.data_modeling.views.retrieve(('mySpace', 'myView', 'v1'))

List views

ViewsAPI.list(limit: int | None = 10, space: Optional[str] = None, include_inherited_properties: bool = True, all_versions: bool = False, include_global: bool = False) ViewList

List views

Parameters
  • limit (int | None) – Maximum number of views to return. Defaults to 10. Set to -1, float(“inf”) or None to return all items.

  • space (str | None) – (str | None): The space to query.

  • include_inherited_properties (bool) – Whether to include properties inherited from views this view implements.

  • all_versions (bool) – Whether to return all versions. If false, only the newest version is returned, which is determined based on the ‘createdTime’ field.

  • include_global (bool) – Whether to include global views.

Returns

List of requested views

Return type

ViewList

Examples

List 5 views:

>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> view_list = client.data_modeling.views.list(limit=5)

Iterate over views:

>>> for view in client.data_modeling.views:
...     view # do something with the view

Iterate over chunks of views to reduce memory load:

>>> for view_list in client.data_modeling.views(chunk_size=10):
...     view_list # do something with the views

Apply view

ViewsAPI.apply(view: Sequence[ViewApply]) ViewList
ViewsAPI.apply(view: ViewApply) View

Create or update (upsert) one or more views.

Parameters

view (ViewApply | Sequence[ViewApply]) – View(s) to create or update.

Returns

Created view(s)

Return type

View | ViewList

Examples

Create new views:

>>> from cognite.client import CogniteClient
>>> from cognite.client.data_classes.data_modeling import ViewApply, MappedPropertyApply, ContainerId
>>> client = CogniteClient()
>>> views = [
...     ViewApply(
...         space="mySpace",
...         external_id="myView",
...         version="v1",
...         properties={
...             "someAlias": MappedPropertyApply(
...                 container=ContainerId("mySpace", "myContainer"),
...                 container_property_identifier="someProperty",
...             ),
...         }
...    )
... ]
>>> res = client.data_modeling.views.apply(views)

Create views with edge relations:

>>> from cognite.client.data_classes.data_modeling import (
...     ContainerId,
...     DirectRelationReference,
...     MappedPropertyApply,
...     MultiEdgeConnectionApply,
...     ViewApply,
...     ViewId
... )
>>> work_order_for_asset = DirectRelationReference(space="mySpace", external_id="work_order_for_asset")
>>> work_order_view = ViewApply(
...     space="mySpace",
...     external_id="WorkOrder",
...     version="v1",
...     name="WorkOrder",
...     properties={
...         "title": MappedPropertyApply(
...             container=ContainerId(space="mySpace", external_id="WorkOrder"),
...             container_property_identifier="title",
...         ),
...         "asset": MultiEdgeConnectionApply(
...             type=work_order_for_asset,
...             direction="outwards",
...             source=ViewId("mySpace", "Asset", "v1"),
...             name="asset",
...         ),
...     }
... )
>>> asset_view = ViewApply(
...     space="mySpace",
...     external_id="Asset",
...     version="v1",
...     name="Asset",
...     properties={
...         "name": MappedPropertyApply(
...             container=ContainerId("mySpace", "Asset"),
...             name="name",
...             container_property_identifier="name",
...         ),
...         "work_orders": MultiEdgeConnectionApply(
...             type=work_order_for_asset,
...             direction="inwards",
...             source=ViewId("mySpace", "WorkOrder", "v1"),
...             name="work_orders",
...         ),
...     }
... )
>>> res = client.data_modeling.views.apply([work_order_view, asset_view])

Delete views

ViewsAPI.delete(ids: cognite.client.data_classes.data_modeling.ids.ViewId | tuple[str, str] | tuple[str, str, str] | collections.abc.Sequence[cognite.client.data_classes.data_modeling.ids.ViewId | tuple[str, str] | tuple[str, str, str]]) list[cognite.client.data_classes.data_modeling.ids.ViewId]

Delete one or more views

Parameters

ids (ViewIdentifier | Sequence[ViewIdentifier]) – View identifier(s)

Returns

The identifier for the view(s) which has been deleted. Empty list if nothing was deleted.

Return type

list[ViewId]

Examples

Delete views by id:

>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> client.data_modeling.views.delete(('mySpace', 'myView', 'v1'))

View data classes

class cognite.client.data_classes.data_modeling.views.ConnectionDefinition

Bases: ViewProperty, ABC

abstract dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.views.ConnectionDefinitionApply

Bases: ViewPropertyApply, ABC

abstract dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.views.EdgeConnection(type: DirectRelationReference, source: ViewId, name: str | None, description: str | None, edge_source: cognite.client.data_classes.data_modeling.ids.ViewId | None, direction: Literal['outwards', 'inwards'])

Bases: ConnectionDefinition, ABC

Describes the edge(s) that are likely to exist to aid in discovery and documentation of the view. A listed edge is not required. i.e. It does not have to exist when included in this list. A connection has a max distance of one hop.

Parameters
  • type (DirectRelationReference) – Reference to the node pointed to by the direct relation. The reference consists of a space and an external-id.

  • source (ViewId) – The target node(s) of this connection can be read through the view specified in ‘source’.

  • name (str | None) – Readable property name.

  • description (str | None) – Description of the content and suggested use for this property.

  • edge_source (ViewId | None) – The edge(s) of this connection can be read through the view specified in ‘edgeSource’.

  • direction (Literal["outwards", "inwards"]) – The direction of the edge. The outward direction is used to indicate that the edge points from the source to the target. The inward direction is used to indicate that the edge points from the target to the source.

abstract dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.views.EdgeConnectionApply(type: DirectRelationReference, source: ViewId, name: Optional[str] = None, description: Optional[str] = None, edge_source: Optional[ViewId] = None, direction: Literal['outwards', 'inwards'] = 'outwards')

Bases: ConnectionDefinitionApply, ABC

Describes the edge(s) that are likely to exist to aid in discovery and documentation of the view. A listed edge is not required. i.e. It does not have to exist when included in this list. A connection has a max distance of one hop.

It is called ‘EdgeConnection’ in the API spec.

Parameters
  • type (DirectRelationReference) – Reference to the node pointed to by the direct relation. The reference consists of a space and an external-id.

  • source (ViewId) – The target node(s) of this connection can be read through the view specified in ‘source’.

  • name (str | None) – Readable property name.

  • description (str | None) – Description of the content and suggested use for this property.

  • edge_source (ViewId | None) – The edge(s) of this connection can be read through the view specified in ‘edgeSource’.

  • direction (Literal["outwards", "inwards"]) – The direction of the edge. The outward direction is used to indicate that the edge points from the source to the target. The inward direction is used to indicate that the edge points from the target to the source.

abstract dump(camel_case: bool = True) dict

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.views.MappedProperty(container: 'ContainerId', container_property_identifier: 'str', type: 'PropertyType', nullable: 'bool', immutable: 'bool', auto_increment: 'bool', source: 'ViewId | None' = None, default_value: 'str | int | dict | None' = None, name: 'str | None' = None, description: 'str | None' = None)

Bases: ViewProperty

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.views.MappedPropertyApply(container: 'ContainerId', container_property_identifier: 'str', name: 'str | None' = None, description: 'str | None' = None, source: 'ViewId | None' = None)

Bases: ViewPropertyApply

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.views.MultiEdgeConnection(type: 'DirectRelationReference', source: 'ViewId', name: 'str | None', description: 'str | None', edge_source: 'ViewId | None', direction: "Literal['outwards', 'inwards']")

Bases: EdgeConnection

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.views.MultiEdgeConnectionApply(type: 'DirectRelationReference', source: 'ViewId', name: 'str | None' = None, description: 'str | None' = None, edge_source: 'ViewId | None' = None, direction: "Literal['outwards', 'inwards']" = 'outwards')

Bases: EdgeConnectionApply

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.views.MultiReverseDirectRelation(source: 'ViewId', through: 'PropertyId', name: 'str | None' = None, description: 'str | None' = None)

Bases: ReverseDirectRelation

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.views.MultiReverseDirectRelationApply(source: 'ViewId', through: 'PropertyId', name: 'str | None' = None, description: 'str | None' = None)

Bases: ReverseDirectRelationApply

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.views.ReverseDirectRelation(source: ViewId, through: PropertyId, name: Optional[str] = None, description: Optional[str] = None)

Bases: ConnectionDefinition, ABC

Describes the direct relation(s) pointing to instances read through this view. This connection type is used to aid in discovery and documentation of the view

It is called ‘ReverseDirectRelationConnection’ in the API spec.

Parameters
  • source (ViewId) – The node(s) containing the direct relation property can be read through the view specified in ‘source’.

  • through (PropertyId) – The view or container of the node containing the direct relation property.

  • name (str | None) – Readable property name.

  • description (str | None) – Description of the content and suggested use for this property.

abstract dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.views.ReverseDirectRelationApply(source: ViewId, through: PropertyId, name: Optional[str] = None, description: Optional[str] = None)

Bases: ConnectionDefinitionApply, ABC

Describes the direct relation(s) pointing to instances read through this view. This connection type is used to aid in discovery and documentation of the view.

It is called ‘ReverseDirectRelationConnection’ in the API spec.

Parameters
  • source (ViewId) – The node(s) containing the direct relation property can be read through the view specified in ‘source’.

  • through (PropertyId) – The view or container of the node containing the direct relation property.

  • name (str | None) – Readable property name.

  • description (str | None) – Description of the content and suggested use for this property.

abstract dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.views.SingleEdgeConnection(type: 'DirectRelationReference', source: 'ViewId', name: 'str | None', description: 'str | None', edge_source: 'ViewId | None', direction: "Literal['outwards', 'inwards']")

Bases: EdgeConnection

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.views.SingleEdgeConnectionApply(type: 'DirectRelationReference', source: 'ViewId', name: 'str | None' = None, description: 'str | None' = None, edge_source: 'ViewId | None' = None, direction: "Literal['outwards', 'inwards']" = 'outwards')

Bases: EdgeConnectionApply

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

cognite.client.data_classes.data_modeling.views.SingleHopConnectionDefinition

alias of MultiEdgeConnection

cognite.client.data_classes.data_modeling.views.SingleHopConnectionDefinitionApply

alias of MultiEdgeConnectionApply

class cognite.client.data_classes.data_modeling.views.SingleReverseDirectRelation(source: 'ViewId', through: 'PropertyId', name: 'str | None' = None, description: 'str | None' = None)

Bases: ReverseDirectRelation

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.views.SingleReverseDirectRelationApply(source: 'ViewId', through: 'PropertyId', name: 'str | None' = None, description: 'str | None' = None)

Bases: ReverseDirectRelationApply

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.views.View(space: str, external_id: str, version: str, properties: dict[str, cognite.client.data_classes.data_modeling.views.ViewProperty], last_updated_time: int, created_time: int, description: str | None, name: str | None, filter: cognite.client.data_classes.filters.Filter | None, implements: list[cognite.client.data_classes.data_modeling.ids.ViewId] | None, writable: bool, used_for: Literal['node', 'edge', 'all'], is_global: bool)

Bases: ViewCore

A group of properties. Read only version.

Parameters
  • space (str) – The workspace for the view, a unique identifier for the space.

  • external_id (str) – Combined with the space is the unique identifier of the view.

  • version (str) – DMS version.

  • properties (dict[str, ViewProperty]) – View with included properties and expected edges, indexed by a unique space-local identifier.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • description (str | None) – Textual description of the view

  • name (str | None) – Human readable name for the view.

  • filter (Filter | None) – A filter Domain Specific Language (DSL) used to create advanced filter queries.

  • implements (list[ViewId] | None) – References to the views from where this view will inherit properties and edges.

  • writable (bool) – Whether the view supports write operations.

  • used_for (Literal['node', 'edge', 'all']) – Does this view apply to nodes, edges or both.

  • is_global (bool) – Whether this is a global view.

as_apply() ViewApply

Convert to a view applies.

Returns

The view apply.

Return type

ViewApply

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

referenced_containers() set[cognite.client.data_classes.data_modeling.ids.ContainerId]

Helper function to get the set of containers referenced by this view.

Returns

The set of containers referenced by this view.

Return type

set[ContainerId]

class cognite.client.data_classes.data_modeling.views.ViewApply(space: str, external_id: str, version: str, description: Optional[str] = None, name: Optional[str] = None, filter: Optional[Filter] = None, implements: Optional[list[cognite.client.data_classes.data_modeling.ids.ViewId]] = None, properties: Optional[dict[str, cognite.client.data_classes.data_modeling.views.ViewPropertyApply]] = None)

Bases: ViewCore

A group of properties. Write only version.

Parameters
  • space (str) – The workspace for the view, a unique identifier for the space.

  • external_id (str) – Combined with the space is the unique identifier of the view.

  • version (str) – DMS version.

  • description (str | None) – Textual description of the view

  • name (str | None) – Human readable name for the view.

  • filter (Filter | None) – A filter Domain Specific Language (DSL) used to create advanced filter queries.

  • implements (list[ViewId] | None) – References to the views from where this view will inherit properties and edges.

  • properties (dict[str, ViewPropertyApply] | None) – No description.

Note

The order of elements (i.e., ViewId) in implements matters, as it indicates priority on how to handle collisions of same properties from different views. See docs on implemented property conflicts for more details.

as_write() ViewApply

Returns this ViewApply instance.

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

referenced_containers() set[cognite.client.data_classes.data_modeling.ids.ContainerId]

Helper function to get the set of containers referenced by this view.

Returns

The set of containers referenced by this view.

Return type

set[ContainerId]

class cognite.client.data_classes.data_modeling.views.ViewApplyList(resources: Iterable[Any], cognite_client: CogniteClient | None = None)

Bases: CogniteResourceList[ViewApply]

as_ids() list[cognite.client.data_classes.data_modeling.ids.ViewId]

Returns the list of ViewIds

Returns

The list of ViewIds

Return type

list[ViewId]

referenced_containers() set[cognite.client.data_classes.data_modeling.ids.ContainerId]

Helper function to get the set of containers referenced by this view.

Returns

The set of containers referenced by this view.

Return type

set[ContainerId]

class cognite.client.data_classes.data_modeling.views.ViewCore(space: str, external_id: str, version: str, description: str | None, name: str | None, filter: cognite.client.data_classes.filters.Filter | None, implements: list[cognite.client.data_classes.data_modeling.ids.ViewId] | None)

Bases: DataModelingSchemaResource[ViewApply], ABC

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.views.ViewFilter(space: Optional[str] = None, include_inherited_properties: bool = True, all_versions: bool = False, include_global: bool = False)

Bases: CogniteFilter

Represent the filer arguments for the list endpoint.

Parameters
  • space (str | None) – The space to query

  • include_inherited_properties (bool) – Whether to include properties inherited from views this view implements.

  • all_versions (bool) – Whether to return all versions. If false, only the newest version is returned, which is determined based on the ‘createdTime’ field.

  • include_global (bool) – Whether to include global views.

class cognite.client.data_classes.data_modeling.views.ViewList(resources: Iterable[Any], cognite_client: CogniteClient | None = None)

Bases: WriteableCogniteResourceList[ViewApply, View]

as_apply() ViewApplyList

Convert to a view an apply list.

Returns

The view apply list.

Return type

ViewApplyList

as_ids() list[cognite.client.data_classes.data_modeling.ids.ViewId]

Returns the list of ViewIds

Returns

The list of ViewIds

Return type

list[ViewId]

referenced_containers() set[cognite.client.data_classes.data_modeling.ids.ContainerId]

Helper function to get the set of containers referenced by this view.

Returns

The set of containers referenced by this view.

Return type

set[ContainerId]

class cognite.client.data_classes.data_modeling.views.ViewProperty

Bases: CogniteObject, ABC

abstract dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.views.ViewPropertyApply

Bases: CogniteObject, ABC

abstract dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

Containers

Retrieve containers by id(s)

ContainersAPI.retrieve(ids: cognite.client.data_classes.data_modeling.ids.ContainerId | tuple[str, str]) cognite.client.data_classes.data_modeling.containers.Container | None
ContainersAPI.retrieve(ids: Sequence[cognite.client.data_classes.data_modeling.ids.ContainerId | tuple[str, str]]) ContainerList

Retrieve one or more container by id(s).

Parameters

ids (ContainerIdentifier | Sequence[ContainerIdentifier]) – Identifier for container(s).

Returns

Requested container or None if it does not exist.

Return type

Container | ContainerList | None

Examples

>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> res = client.data_modeling.containers.retrieve(('mySpace', 'myContainer'))

Fetch using the ContainerId:

>>> from cognite.client.data_classes.data_modeling import ContainerId
>>> res = client.data_modeling.containers.retrieve(
...     ContainerId(space='mySpace', external_id='myContainer'))

List containers

ContainersAPI.list(space: Optional[str] = None, limit: int | None = 10, include_global: bool = False) ContainerList

List containers

Parameters
  • space (str | None) – The space to query

  • limit (int | None) – Maximum number of containers to return. Defaults to 10. Set to -1, float(“inf”) or None to return all items.

  • include_global (bool) – Whether the global containers should be returned.

Returns

List of requested containers

Return type

ContainerList

Examples

List containers and limit to 5:

>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> container_list = client.data_modeling.containers.list(limit=5)

Iterate over containers:

>>> for container in client.data_modeling.containers:
...     container # do something with the container

Iterate over chunks of containers to reduce memory load:

>>> for container_list in client.data_modeling.containers(chunk_size=10):
...     container_list # do something with the containers

Apply containers

ContainersAPI.apply(container: Sequence[ContainerApply]) ContainerList
ContainersAPI.apply(container: ContainerApply) Container

Add or update (upsert) containers.

Parameters

container (ContainerApply | Sequence[ContainerApply]) – Container(s) to create or update.

Returns

Created container(s)

Return type

Container | ContainerList

Examples

Create a new container:

>>> from cognite.client import CogniteClient
>>> from cognite.client.data_classes.data_modeling import (
...     ContainerApply, ContainerProperty, Text, Float64)
>>> client = CogniteClient()
>>> container = ContainerApply(
...     space="mySpace",
...     external_id="myContainer",
...     properties={
...         "name": ContainerProperty(type=Text, name="name"),
...         "numbers": ContainerProperty(
...             type=Float64(is_list=True, max_list_size=200),
...             description="very important numbers",
...         ),
...     },
... ),
>>> res = client.data_modeling.containers.apply(container)

Create new container with unit-aware properties:

>>> from cognite.client.data_classes.data_modeling import Float64
>>> from cognite.client.data_classes.data_modeling.data_types import UnitReference
>>> container = ContainerApply(
...     space="mySpace",
...     external_id="myContainer",
...     properties={
...         "maxPressure": ContainerProperty(
...             nullable=True,
...             description="Maximum Pump Pressure",
...             name="maxPressure",
...             type=Float64(
...                 unit=UnitReference(
...                     external_id="pressure:bar",
...                     source_unit="BAR"
...                 )
...             )
...         ),
...         "rotationConfigurations": ContainerProperty(
...             nullable=True,
...             description="Rotation Configurations",
...             name="rotationConfigurations",
...             type=Float64(
...                 is_list=True,
...                 unit=UnitReference(
...                     external_id="angular_velocity:rev-per-min"
...                 )
...             )
...         )
...     }
... )
>>> res = client.data_modeling.containers.apply(container)

Example container with all available properties (for illustration purposes). Note that ContainerProperty has several options not shown here, like name, description, nullable, auto_increment, default_value and immutable that may be specified, depending on the choice of property type (e.g. auto_increment only works with integer types).

>>> from cognite.client.data_classes.data_modeling.data_types import UnitReference, EnumValue
>>> from cognite.client.data_classes.data_modeling.data_types import (
...     Boolean, Date, DirectRelation, Enum, FileReference, Float32, Float64,
...     Int32, Int64, Json, SequenceReference, Text, TimeSeriesReference, Timestamp
... )
>>> container_properties = {
...     "prop01": ContainerProperty(Boolean),
...     "prop02": ContainerProperty(Boolean(is_list=True)),
...     "prop03": ContainerProperty(Date),
...     "prop04": ContainerProperty(Date(is_list=True)),
...     "prop05": ContainerProperty(Timestamp),
...     "prop06": ContainerProperty(Timestamp(is_list=True)),
...     "prop07": ContainerProperty(Text),
...     "prop08": ContainerProperty(Text(is_list=True)),
...     # Note: DirectRelation(list) support `container`: The (optional) required type for the node
...     #       the direct relation points to.
...     "prop09": ContainerProperty(DirectRelation),
...     "prop10": ContainerProperty(DirectRelation(is_list=True)),
...     # Note: Enum also support `unknown_value`: The value to use when the enum value is unknown.
...     "prop11": ContainerProperty(
...         Enum({"Closed": EnumValue("Valve is closed"),
...               "Opened": EnumValue("Valve is opened")})),
...     # Note: Floats support unit references, e.g. `unit=UnitReference("pressure:bar")`:
...     "prop12": ContainerProperty(Float32),
...     "prop13": ContainerProperty(Float32(is_list=True)),
...     "prop14": ContainerProperty(Float64),
...     "prop15": ContainerProperty(Float64(is_list=True)),
...     "prop16": ContainerProperty(Int32),
...     "prop17": ContainerProperty(Int32(is_list=True)),
...     "prop18": ContainerProperty(Int64),
...     "prop19": ContainerProperty(Int64(is_list=True)),
...     "prop20": ContainerProperty(Json),
...     "prop21": ContainerProperty(Json(is_list=True)),
...     "prop22": ContainerProperty(SequenceReference),
...     "prop23": ContainerProperty(SequenceReference(is_list=True)),
...     # Note: It is adviced to represent files and time series directly as nodes
...     #       instead of referencing existing:
...     "prop24": ContainerProperty(FileReference),
...     "prop25": ContainerProperty(FileReference(is_list=True)),
...     "prop26": ContainerProperty(TimeSeriesReference),
...     "prop27": ContainerProperty(TimeSeriesReference(is_list=True)),
... }
>>> container = ContainerApply(
...     space="my-space",
...     external_id="my-everything-container",
...     properties=container_properties,
... )

Delete containers

ContainersAPI.delete(ids: cognite.client.data_classes.data_modeling.ids.ContainerId | tuple[str, str] | collections.abc.Sequence[cognite.client.data_classes.data_modeling.ids.ContainerId | tuple[str, str]]) list[cognite.client.data_classes.data_modeling.ids.ContainerId]

Delete one or more containers

Parameters

ids (ContainerIdentifier | Sequence[ContainerIdentifier]) – The container identifier(s).

Returns

The container(s) which has been deleted. Empty list if nothing was deleted.

Return type

list[ContainerId]

Examples

Delete containers by id:

>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> client.data_modeling.containers.delete(("mySpace", "myContainer"))

Delete constraints

ContainersAPI.delete_constraints(ids: Sequence[tuple[cognite.client.data_classes.data_modeling.ids.ContainerId, str]]) list[tuple[cognite.client.data_classes.data_modeling.ids.ContainerId, str]]

Delete one or more constraints

Parameters

ids (Sequence[ConstraintIdentifier]) – The constraint identifier(s).

Returns

The constraints(s) which have been deleted.

Return type

list[ConstraintIdentifier]

Examples

Delete constraints by id:

>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> client.data_modeling.containers.delete_constraints(
...     [(ContainerId("mySpace", "myContainer"), "myConstraint")]
... )

Delete indexes

ContainersAPI.delete_indexes(ids: Sequence[tuple[cognite.client.data_classes.data_modeling.ids.ContainerId, str]]) list[tuple[cognite.client.data_classes.data_modeling.ids.ContainerId, str]]

Delete one or more indexes

Parameters

ids (Sequence[IndexIdentifier]) – The index identifier(s).

Returns

The indexes(s) which has been deleted.

Return type

list[IndexIdentifier]

Examples

Delete indexes by id:

>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> client.data_modeling.containers.delete_indexes(
...     [(ContainerId("mySpace", "myContainer"), "myIndex")]
... )

Containers data classes

class cognite.client.data_classes.data_modeling.containers.BTreeIndex(properties: 'list[str]', cursorable: 'bool' = False)

Bases: Index

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.containers.Constraint

Bases: CogniteObject, ABC

abstract dump(camel_case: bool = True) dict[str, str | dict]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.containers.Container(space: str, external_id: str, properties: dict[str, cognite.client.data_classes.data_modeling.containers.ContainerProperty], is_global: bool, last_updated_time: int, created_time: int, description: str | None, name: str | None, used_for: Literal['node', 'edge', 'all'], constraints: dict[str, cognite.client.data_classes.data_modeling.containers.Constraint] | None, indexes: dict[str, cognite.client.data_classes.data_modeling.containers.Index] | None)

Bases: ContainerCore

Represent the physical storage of data. This is the read format of the container

Parameters
  • space (str) – The workspace for the container, a unique identifier for the space.

  • external_id (str) – Combined with the space is the unique identifier of the container.

  • properties (dict[str, ContainerProperty]) – We index the property by a local unique identifier.

  • is_global (bool) – Whether this is a global container, i.e., one of the out-of-the-box models.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • description (str | None) – Textual description of the container

  • name (str | None) – Human readable name for the container.

  • used_for (Literal['node', 'edge', 'all']) – Should this operation apply to nodes, edges or both.

  • constraints (dict[str, Constraint] | None) – Set of constraints to apply to the container

  • indexes (dict[str, Index] | None) – Set of indexes to apply to the container.

class cognite.client.data_classes.data_modeling.containers.ContainerApply(space: str, external_id: str, properties: dict[str, cognite.client.data_classes.data_modeling.containers.ContainerProperty], description: Optional[str] = None, name: Optional[str] = None, used_for: Optional[Literal['node', 'edge', 'all']] = None, constraints: Optional[dict[str, cognite.client.data_classes.data_modeling.containers.Constraint]] = None, indexes: Optional[dict[str, cognite.client.data_classes.data_modeling.containers.Index]] = None)

Bases: ContainerCore

Represent the physical storage of data. This is the write format of the container

Parameters
  • space (str) – The workspace for the container, a unique identifier for the space.

  • external_id (str) – Combined with the space is the unique identifier of the container.

  • properties (dict[str, ContainerProperty]) – We index the property by a local unique identifier.

  • description (str | None) – Textual description of the container

  • name (str | None) – Human readable name for the container.

  • used_for (Literal['node', 'edge', 'all'] | None) – Should this operation apply to nodes, edges or both.

  • constraints (dict[str, Constraint] | None) – Set of constraints to apply to the container

  • indexes (dict[str, Index] | None) – Set of indexes to apply to the container.

as_write() ContainerApply

Returns this ContainerApply instance.

class cognite.client.data_classes.data_modeling.containers.ContainerApplyList(resources: Iterable[Any], cognite_client: CogniteClient | None = None)

Bases: CogniteResourceList[ContainerApply]

as_ids() list[cognite.client.data_classes.data_modeling.ids.ContainerId]

Convert to a container id list.

Returns

The container id list.

Return type

list[ContainerId]

class cognite.client.data_classes.data_modeling.containers.ContainerCore(space: str, external_id: str, properties: dict[str, cognite.client.data_classes.data_modeling.containers.ContainerProperty], description: str | None, name: str | None, constraints: dict[str, cognite.client.data_classes.data_modeling.containers.Constraint] | None, indexes: dict[str, cognite.client.data_classes.data_modeling.containers.Index] | None)

Bases: DataModelingSchemaResource[ContainerApply], ABC

Represent the physical storage of data. This is the base class for the read and write version.

Parameters
  • space (str) – The workspace for the container, a unique identifier for the space.

  • external_id (str) – Combined with the space is the unique identifier of the container.

  • properties (dict[str, ContainerProperty]) – We index the property by a local unique identifier.

  • description (str | None) – Textual description of the container

  • name (str | None) – Human readable name for the container.

  • constraints (dict[str, Constraint] | None) – Set of constraints to apply to the container

  • indexes (dict[str, Index] | None) – Set of indexes to apply to the container.

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.containers.ContainerList(resources: Iterable[Any], cognite_client: CogniteClient | None = None)

Bases: WriteableCogniteResourceList[ContainerApply, Container]

as_apply() ContainerApplyList

Convert to a ContainerApply list.

Returns

The container apply list.

Return type

ContainerApplyList

as_ids() list[cognite.client.data_classes.data_modeling.ids.ContainerId]

Convert to a container id list.

Returns

The container id list.

Return type

list[ContainerId]

class cognite.client.data_classes.data_modeling.containers.ContainerProperty(type: 'PropertyType', nullable: 'bool' = True, auto_increment: 'bool' = False, name: 'str | None' = None, default_value: 'str | int | float | bool | dict | None' = None, description: 'str | None' = None, immutable: 'bool' = False)

Bases: CogniteObject

dump(camel_case: bool = True) dict[str, str | dict]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.containers.Index

Bases: CogniteObject, ABC

abstract dump(camel_case: bool = True) dict[str, str | dict]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.containers.InvertedIndex(properties: 'list[str]')

Bases: Index

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.containers.RequiresConstraint(require: 'ContainerId')

Bases: Constraint

dump(camel_case: bool = True) dict[str, str | dict]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.containers.UniquenessConstraint(properties: 'list[str]')

Bases: Constraint

dump(camel_case: bool = True) dict[str, str | dict]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

Instances

Retrieve instances by id(s)

InstancesAPI.retrieve(nodes: Optional[Union[NodeId, Sequence[NodeId], tuple[str, str], Sequence[tuple[str, str]]]] = None, edges: Optional[Union[EdgeId, Sequence[EdgeId], tuple[str, str], Sequence[tuple[str, str]]]] = None, sources: Optional[Union[SourceSelector, View, ViewId, tuple[str, str], tuple[str, str, str], Sequence[cognite.client.data_classes.data_modeling.query.SourceSelector | cognite.client.data_classes.data_modeling.views.View | cognite.client.data_classes.data_modeling.ids.ViewId | tuple[str, str] | tuple[str, str, str]]]] = None, include_typing: bool = False) InstancesResult[Node, Edge]

Retrieve one or more instance by id(s).

Parameters
  • nodes (NodeId | Sequence[NodeId] | tuple[str, str] | Sequence[tuple[str, str]] | None) – Node ids

  • edges (EdgeId | Sequence[EdgeId] | tuple[str, str] | Sequence[tuple[str, str]] | None) – Edge ids

  • sources (Source | Sequence[Source] | None) – Retrieve properties from the listed - by reference - views.

  • include_typing (bool) – Whether to return property type information as part of the result.

Returns

Requested instances.

Return type

InstancesResult[Node, Edge]

Examples

Retrieve instances by id:

>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> res = client.data_modeling.instances.retrieve(
...     nodes=("mySpace", "myNodeExternalId"),
...     edges=("mySpace", "myEdgeExternalId"),
...     sources=("mySpace", "myViewExternalId", "myViewVersion"))

Retrieve nodes an edges using the built in data class

>>> from cognite.client.data_classes.data_modeling import NodeId, EdgeId, ViewId
>>> res = client.data_modeling.instances.retrieve(
...     NodeId("mySpace", "myNode"),
...     EdgeId("mySpace", "myEdge"),
...     ViewId("mySpace", "myViewExternalId", "myViewVersion"))

Retrieve nodes an edges using the the view object as source

>>> from cognite.client.data_classes.data_modeling import NodeId, EdgeId
>>> res = client.data_modeling.instances.retrieve(
...     NodeId("mySpace", "myNode"),
...     EdgeId("mySpace", "myEdge"),
...     sources=("myspace", "myView"))

Retrieve Nodes by id(s)

InstancesAPI.retrieve_nodes(nodes: cognite.client.data_classes.data_modeling.ids.NodeId | tuple[str, str], *, node_cls: type[T_Node]) Optional[T_Node]
InstancesAPI.retrieve_nodes(nodes: cognite.client.data_classes.data_modeling.ids.NodeId | tuple[str, str], *, sources: cognite.client.data_classes.data_modeling.query.SourceSelector | cognite.client.data_classes.data_modeling.views.View | cognite.client.data_classes.data_modeling.ids.ViewId | tuple[str, str] | tuple[str, str, str] | collections.abc.Sequence[cognite.client.data_classes.data_modeling.query.SourceSelector | cognite.client.data_classes.data_modeling.views.View | cognite.client.data_classes.data_modeling.ids.ViewId | tuple[str, str] | tuple[str, str, str]] | None = None, include_typing: bool = False) cognite.client.data_classes.data_modeling.instances.Node | None
InstancesAPI.retrieve_nodes(nodes: collections.abc.Sequence[cognite.client.data_classes.data_modeling.ids.NodeId] | collections.abc.Sequence[tuple[str, str]], *, node_cls: type[T_Node]) NodeList[T_Node]
InstancesAPI.retrieve_nodes(nodes: collections.abc.Sequence[cognite.client.data_classes.data_modeling.ids.NodeId] | collections.abc.Sequence[tuple[str, str]], *, sources: cognite.client.data_classes.data_modeling.query.SourceSelector | cognite.client.data_classes.data_modeling.views.View | cognite.client.data_classes.data_modeling.ids.ViewId | tuple[str, str] | tuple[str, str, str] | collections.abc.Sequence[cognite.client.data_classes.data_modeling.query.SourceSelector | cognite.client.data_classes.data_modeling.views.View | cognite.client.data_classes.data_modeling.ids.ViewId | tuple[str, str] | tuple[str, str, str]] | None = None, include_typing: bool = False) NodeList[Node]

Retrieve one or more nodes by id(s).

Note

This method should be used for retrieving nodes with a custom node class. You can use it without providing a custom node class, but in that case, the retrieved nodes will be of the built-in Node class.

Parameters
  • nodes (NodeId | Sequence[NodeId] | tuple[str, str] | Sequence[tuple[str, str]]) – Node id(s) to retrieve.

  • node_cls (type[T_Node]) – The custom node class to use, the retrieved nodes will automatically be serialized to this class.

  • sources (Source | Sequence[Source] | None) – Retrieve properties from the listed - by reference - views. This only applies if you do not provide a custom node class.

  • include_typing (bool) – Whether to include typing information

Returns

The requested edges.

Return type

NodeList[T_Node] | T_Node | Node | None

Retrieve nodes using a custom typed node class “Person”. Any property that you want to look up by a different attribute name, e.g. you want my_node.birth_year to return the data for property birthYear, must use the PropertyOptions as shown below. We strongly suggest you use snake_cased attribute names, as is done here:

>>> from cognite.client import CogniteClient
>>> from cognite.client.data_classes.data_modeling import NodeId, TypedNode, PropertyOptions, DirectRelationReference, ViewId
>>> class Person(TypedNode):
...    birth_year = PropertyOptions(identifier="birthYear")
...
...    def __init__(
...        self,
...        space: str,
...        external_id: str,
...        version: int,
...        last_updated_time: int,
...        created_time: int,
...        name: str,
...        birth_year: int | None = None,
...        type: DirectRelationReference | None = None,
...        deleted_time: int | None = None,
...    ):
...        super().__init__(
...            space=space,
...            external_id=external_id,
...            version=version,
...            last_updated_time=last_updated_time,
...            created_time=created_time,
...            type=type,
...            deleted_time=deleted_time
...        )
...        self.name = name
...        self.birth_year = birth_year
...
...    @classmethod
...    def get_source(cls) -> ViewId:
...        return ViewId("myModelSpace", "Person", "1")
...
>>> client = CogniteClient()
>>> res = client.data_modeling.instances.retrieve_nodes(
...     NodeId("myDataSpace", "myPerson"), node_cls=Person
... )
>>> isinstance(res, Person)

Retrieve Edges by id(s)

InstancesAPI.retrieve_edges(edges: cognite.client.data_classes.data_modeling.ids.EdgeId | tuple[str, str], *, edge_cls: type[T_Edge]) Optional[T_Edge]
InstancesAPI.retrieve_edges(edges: cognite.client.data_classes.data_modeling.ids.EdgeId | tuple[str, str], *, sources: cognite.client.data_classes.data_modeling.query.SourceSelector | cognite.client.data_classes.data_modeling.views.View | cognite.client.data_classes.data_modeling.ids.ViewId | tuple[str, str] | tuple[str, str, str] | collections.abc.Sequence[cognite.client.data_classes.data_modeling.query.SourceSelector | cognite.client.data_classes.data_modeling.views.View | cognite.client.data_classes.data_modeling.ids.ViewId | tuple[str, str] | tuple[str, str, str]] | None = None, include_typing: bool = False) cognite.client.data_classes.data_modeling.instances.Edge | None
InstancesAPI.retrieve_edges(edges: collections.abc.Sequence[cognite.client.data_classes.data_modeling.ids.EdgeId] | collections.abc.Sequence[tuple[str, str]], *, edge_cls: type[T_Edge]) EdgeList[T_Edge]
InstancesAPI.retrieve_edges(edges: collections.abc.Sequence[cognite.client.data_classes.data_modeling.ids.EdgeId] | collections.abc.Sequence[tuple[str, str]], *, sources: cognite.client.data_classes.data_modeling.query.SourceSelector | cognite.client.data_classes.data_modeling.views.View | cognite.client.data_classes.data_modeling.ids.ViewId | tuple[str, str] | tuple[str, str, str] | collections.abc.Sequence[cognite.client.data_classes.data_modeling.query.SourceSelector | cognite.client.data_classes.data_modeling.views.View | cognite.client.data_classes.data_modeling.ids.ViewId | tuple[str, str] | tuple[str, str, str]] | None = None, include_typing: bool = False) EdgeList[Edge]

Retrieve one or more edges by id(s).

Note

This method should be used for retrieving edges with a custom edge class.You can use it without providing a custom node class, but in that case, the retrieved nodes will be of the built-in Edge class.

Parameters
  • edges (EdgeId | Sequence[EdgeId] | tuple[str, str] | Sequence[tuple[str, str]]) – Edge id(s) to retrieve.

  • edge_cls (type[T_Edge]) – The custom edge class to use, the retrieved edges will automatically be serialized into this class.

  • sources (Source | Sequence[Source] | None) – Retrieve properties from the listed - by reference - views. This only applies if you do not provide a custom edge class.

  • include_typing (bool) – Whether to include typing information

Returns

The requested edges.

Return type

EdgeList[T_Edge] | T_Edge | Edge | None

Retrieve edges using a custom typed class “Flow”. Any property that you want to look up by a different attribute name, e.g. you want my_edge.flow_rate to return the data for property flowRate, must use the PropertyOptions as shown below. We strongly suggest you use snake_cased attribute names, as is done here:

>>> from cognite.client import CogniteClient
>>> from cognite.client.data_classes.data_modeling import EdgeId, TypedEdge, PropertyOptions, DirectRelationReference, ViewId
>>> class Flow(TypedEdge):
...    flow_rate = PropertyOptions(identifier="flowRate")
...
...    def __init__(
...        self,
...        space: str,
...        external_id: str,
...        version: int,
...        type: DirectRelationReference,
...        last_updated_time: int,
...        created_time: int,
...        flow_rate: float,
...        start_node: DirectRelationReference,
...        end_node: DirectRelationReference,
...        deleted_time: int | None = None,
...    ) -> None:
...        super().__init__(
...            space, external_id, version, type, last_updated_time, created_time, start_node, end_node, deleted_time
...        )
...        self.flow_rate = flow_rate
...
...    @classmethod
...    def get_source(cls) -> ViewId:
...        return ViewId("sp_model_space", "flow", "1")
...
>>> client = CogniteClient()
>>> res = client.data_modeling.instances.retrieve_edges(
...     EdgeId("mySpace", "theFlow"), edge_cls=Flow
... )
>>> isinstance(res, Flow)

List instances

InstancesAPI.list(instance_type: Literal['node'] = 'node', include_typing: bool = False, sources: cognite.client.data_classes.data_modeling.query.SourceSelector | cognite.client.data_classes.data_modeling.views.View | cognite.client.data_classes.data_modeling.ids.ViewId | tuple[str, str] | tuple[str, str, str] | collections.abc.Sequence[cognite.client.data_classes.data_modeling.query.SourceSelector | cognite.client.data_classes.data_modeling.views.View | cognite.client.data_classes.data_modeling.ids.ViewId | tuple[str, str] | tuple[str, str, str]] | None = None, space: Optional[Union[str, SequenceNotStr[str]]] = None, limit: int | None = DEFAULT_LIMIT_READ, sort: collections.abc.Sequence[cognite.client.data_classes.data_modeling.instances.InstanceSort | dict] | cognite.client.data_classes.data_modeling.instances.InstanceSort | dict | None = None, filter: cognite.client.data_classes.filters.Filter | dict[str, Any] | None = None, debug: DebugParameters | None = None) NodeList[Node]
InstancesAPI.list(instance_type: Literal['edge'], include_typing: bool = False, sources: cognite.client.data_classes.data_modeling.query.SourceSelector | cognite.client.data_classes.data_modeling.views.View | cognite.client.data_classes.data_modeling.ids.ViewId | tuple[str, str] | tuple[str, str, str] | collections.abc.Sequence[cognite.client.data_classes.data_modeling.query.SourceSelector | cognite.client.data_classes.data_modeling.views.View | cognite.client.data_classes.data_modeling.ids.ViewId | tuple[str, str] | tuple[str, str, str]] | None = None, space: Optional[Union[str, SequenceNotStr[str]]] = None, limit: int | None = DEFAULT_LIMIT_READ, sort: collections.abc.Sequence[cognite.client.data_classes.data_modeling.instances.InstanceSort | dict] | cognite.client.data_classes.data_modeling.instances.InstanceSort | dict | None = None, filter: cognite.client.data_classes.filters.Filter | dict[str, Any] | None = None, debug: DebugParameters | None = None) EdgeList[Edge]
InstancesAPI.list(instance_type: type[T_Node], *, space: Optional[Union[str, SequenceNotStr[str]]] = None, limit: int | None = DEFAULT_LIMIT_READ, sort: collections.abc.Sequence[cognite.client.data_classes.data_modeling.instances.InstanceSort | dict] | cognite.client.data_classes.data_modeling.instances.InstanceSort | dict | None = None, filter: cognite.client.data_classes.filters.Filter | dict[str, Any] | None = None, debug: DebugParameters | None = None) NodeList[T_Node]
InstancesAPI.list(instance_type: type[T_Edge], *, space: Optional[Union[str, SequenceNotStr[str]]] = None, limit: int | None = DEFAULT_LIMIT_READ, sort: collections.abc.Sequence[cognite.client.data_classes.data_modeling.instances.InstanceSort | dict] | cognite.client.data_classes.data_modeling.instances.InstanceSort | dict | None = None, filter: cognite.client.data_classes.filters.Filter | dict[str, Any] | None = None, debug: DebugParameters | None = None) EdgeList[T_Edge]

List instances

Parameters
  • instance_type (Literal['node', 'edge'] | type[T_Node] | type[T_Edge]) – Whether to query for nodes or edges. You can also pass a custom typed node (or edge class) inheriting from TypedNode (or TypedEdge). See apply, retrieve_nodes or retrieve_edges for an example.

  • include_typing (bool) – Whether to return property type information as part of the result.

  • sources (Source | Sequence[Source] | None) – Views to retrieve properties from.

  • space (str | SequenceNotStr[str] | None) – Only return instances in the given space (or list of spaces).

  • limit (int | None) – Maximum number of instances to return. Defaults to 25. Set to -1, float(“inf”) or None to return all items.

  • sort (Sequence[InstanceSort | dict] | InstanceSort | dict | None) – How you want the listed instances information ordered.

  • filter (Filter | dict[str, Any] | None) – Advanced filtering of instances.

  • debug (DebugParameters | None) – Debug settings for profiling and troubleshooting.

Returns

List of requested instances

Return type

NodeList[T_Node] | EdgeList[T_Edge]

Examples

List instances and limit to 5:

>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> instance_list = client.data_modeling.instances.list(limit=5)

List some instances in the space ‘my-space’:

>>> instance_list = client.data_modeling.instances.list(space="my-space")

List instances and sort by some property:

>>> from cognite.client.data_classes.data_modeling import InstanceSort
>>> property_sort = InstanceSort(
...     property=('space', 'view_xid/view_version', 'some_property'),
...     direction="descending",
...     nulls_first=True)
>>> instance_list = client.data_modeling.instances.list(sort=property_sort)

Iterate over instances (note: returns nodes):

>>> for instance in client.data_modeling.instances:
...     instance # do something with the instance

Iterate over chunks of instances to reduce memory load:

>>> for instance_list in client.data_modeling.instances(chunk_size=100):
...     instance_list # do something with the instances

List instances with a view as source:

>>> from cognite.client.data_classes.data_modeling import ViewId
>>> my_view = ViewId("mySpace", "myView", "v1")
>>> instance_list = client.data_modeling.instances.list(sources=my_view)

Convert instances to pandas DataFrame with expanded properties (expand_properties=True). This will add the properties directly as dataframe columns. Specifying camel_case=True will convert the basic columns to camel case (e.g. externalId), but leave the property names as-is.

>>> df = instance_list.to_pandas(
...     expand_properties=True,
...     camel_case=True,
... )

To debug and/or profile your query, you can use the debug parameter:

>>> from cognite.client.data_classes.data_modeling.debug import DebugParameters
>>> debug_params = DebugParameters(
...     emit_results=False,
...     include_plan=True,  # Include the postgres execution plan
...     include_translated_query=True,  # Include the internal representation of the query.
...     profile=True,
... )
>>> res = client.data_modeling.instances.list(
...     debug=debug_params, sources=my_view
... )
>>> print(res.debug)

Apply instances

InstancesAPI.apply(nodes: Optional[Union[NodeApply, Sequence[NodeApply]]] = None, edges: Optional[Union[EdgeApply, Sequence[EdgeApply]]] = None, auto_create_start_nodes: bool = False, auto_create_end_nodes: bool = False, auto_create_direct_relations: bool = True, skip_on_version_conflict: bool = False, replace: bool = False) InstancesApplyResult

Add or update (upsert) instances.

Parameters
  • nodes (NodeApply | Sequence[NodeApply] | None) – Nodes to apply

  • edges (EdgeApply | Sequence[EdgeApply] | None) – Edges to apply

  • auto_create_start_nodes (bool) – Whether to create missing start nodes for edges when ingesting. By default, the start node of an edge must exist before it can be ingested.

  • auto_create_end_nodes (bool) – Whether to create missing end nodes for edges when ingesting. By default, the end node of an edge must exist before it can be ingested.

  • auto_create_direct_relations (bool) – Whether to create missing direct relation targets when ingesting.

  • skip_on_version_conflict (bool) – If existingVersion is specified on any of the nodes/edges in the input, the default behaviour is that the entire ingestion will fail when version conflicts occur. If skipOnVersionConflict is set to true, items with version conflicts will be skipped instead. If no version is specified for nodes/edges, it will do the writing directly.

  • replace (bool) – How do we behave when a property value exists? Do we replace all matching and existing values with the supplied values (true)? Or should we merge in new values for properties together with the existing values (false)? Note: This setting applies for all nodes or edges specified in the ingestion call.

Returns

Created instance(s)

Return type

InstancesApplyResult

Examples

Create new node without data:

>>> from cognite.client import CogniteClient
>>> from cognite.client.data_classes.data_modeling import EdgeApply, NodeOrEdgeData, NodeApply
>>> client = CogniteClient()
>>> node = NodeApply("mySpace", "myNodeId")
>>> res = client.data_modeling.instances.apply(node)

Create two nodes with data with a one-to-many edge

>>> from cognite.client.data_classes.data_modeling import ContainerId, EdgeApply, NodeOrEdgeData, NodeApply, ViewId
>>> work_order = NodeApply(
...     space="industrial",
...     external_id="work_order:123",
...     sources=[
...         # Insert data through a view
...         NodeOrEdgeData(
...             ViewId("mySpace", "WorkOrderView", "v1"),
...             {"title": "Repair pump", "createdYear": 2023}
...         )
...     ]
... )
>>> pump = NodeApply(
...     space="industrial",
...     external_id="pump:456",
...     sources=[
...         # Insert data directly to the container
...         NodeOrEdgeData(
...             ContainerId("mySpace", "PumpContainer"),
...             {"name": "Pump 456", "location": "Subsea"}
...         )
...     ]
... )
... # This is one-to-many edge, in this case from a work order to a pump
>>> work_order_to_pump = EdgeApply(
...     space="industrial",
...     external_id="relation:work_order:123:pump:456",
...     type=("industrial", "relates-to"),
...     start_node=("industrial", "work_order:123"),
...     end_node=("industrial", "pump:456"),
... )
>>> res = client.data_modeling.instances.apply([work_order, pump], [work_order_to_pump])

Create new edge and automatically create end nodes.

>>> from cognite.client.data_classes.data_modeling import EdgeApply
>>> work_order_to_pump = EdgeApply(
...     space="industrial",
...     external_id="relation:work_order:123:pump:456",
...     type=("industrial", "relates-to"),
...     start_node=("industrial", "work_order:123"),
...     end_node=("industrial", "pump:456"),
... )
>>> res = client.data_modeling.instances.apply(
...     edges=work_order_to_pump,
...     auto_create_start_nodes=True,
...     auto_create_end_nodes=True
... )

Using helper function to create valid graphql timestamp for a datetime object:

>>> from cognite.client.utils import datetime_to_ms_iso_timestamp
>>> from datetime import datetime, timezone
>>> my_date = datetime(2020, 3, 14, 15, 9, 26, 535000, tzinfo=timezone.utc)
>>> data_model_timestamp = datetime_to_ms_iso_timestamp(my_date)  # "2020-03-14T15:09:26.535+00:00"

Create a typed node apply. Any property that you want to look up by a different attribute name, e.g. you want my_node.birth_year to return the data for property birthYear, must use the PropertyOptions as shown below. We strongly suggest you use snake_cased attribute names, as is done here:

>>> from cognite.client.data_classes.data_modeling import TypedNodeApply, PropertyOptions
>>> class PersonApply(TypedNodeApply):
...     birth_year = PropertyOptions(identifier="birthYear")
...
...     def __init__(self, space: str, external_id, name: str, birth_year: int):
...         super().__init__(space, external_id, type=("sp_model_space", "Person"))
...         self.name = name
...         self.birth_year = birth_year
...     def get_source(self):
...         return ViewId("sp_model_space", "Person", "v1")
...
>>> person = PersonApply("sp_date_space", "my_person", "John Doe", 1980)
>>> res = client.data_modeling.instances.apply(nodes=person)

Search instances

InstancesAPI.search(view: ViewId, query: str | None = None, *, instance_type: Literal['node'] = 'node', properties: list[str] | None = None, target_units: list[cognite.client.data_classes.data_modeling.instances.TargetUnit] | None = None, space: Optional[Union[str, SequenceNotStr[str]]] = None, filter: cognite.client.data_classes.filters.Filter | dict[str, Any] | None = None, include_typing: bool = False, limit: int | None = DEFAULT_LIMIT_READ, sort: collections.abc.Sequence[cognite.client.data_classes.data_modeling.instances.InstanceSort | dict] | cognite.client.data_classes.data_modeling.instances.InstanceSort | dict | None = None, operator: Literal['AND', 'OR'] = 'OR') NodeList[Node]
InstancesAPI.search(view: ViewId, query: str | None = None, *, instance_type: Literal['edge'], properties: list[str] | None = None, target_units: list[cognite.client.data_classes.data_modeling.instances.TargetUnit] | None = None, space: Optional[Union[str, SequenceNotStr[str]]] = None, filter: cognite.client.data_classes.filters.Filter | dict[str, Any] | None = None, include_typing: bool = False, limit: int | None = DEFAULT_LIMIT_READ, sort: collections.abc.Sequence[cognite.client.data_classes.data_modeling.instances.InstanceSort | dict] | cognite.client.data_classes.data_modeling.instances.InstanceSort | dict | None = None, operator: Literal['AND', 'OR'] = 'OR') EdgeList[Edge]
InstancesAPI.search(view: ViewId, query: str | None = None, *, instance_type: type[T_Node], properties: list[str] | None = None, target_units: list[cognite.client.data_classes.data_modeling.instances.TargetUnit] | None = None, space: Optional[Union[str, SequenceNotStr[str]]] = None, filter: cognite.client.data_classes.filters.Filter | dict[str, Any] | None = None, include_typing: bool = False, limit: int | None = DEFAULT_LIMIT_READ, sort: collections.abc.Sequence[cognite.client.data_classes.data_modeling.instances.InstanceSort | dict] | cognite.client.data_classes.data_modeling.instances.InstanceSort | dict | None = None, operator: Literal['AND', 'OR'] = 'OR') NodeList[T_Node]
InstancesAPI.search(view: ViewId, query: str | None = None, *, instance_type: type[T_Edge], properties: list[str] | None = None, target_units: list[cognite.client.data_classes.data_modeling.instances.TargetUnit] | None = None, space: Optional[Union[str, SequenceNotStr[str]]] = None, filter: cognite.client.data_classes.filters.Filter | dict[str, Any] | None = None, include_typing: bool = False, limit: int | None = DEFAULT_LIMIT_READ, sort: collections.abc.Sequence[cognite.client.data_classes.data_modeling.instances.InstanceSort | dict] | cognite.client.data_classes.data_modeling.instances.InstanceSort | dict | None = None, operator: Literal['AND', 'OR'] = 'OR') EdgeList[T_Edge]

Search instances

Parameters
  • view (ViewId) – View to search in.

  • query (str | None) – Query string that will be parsed and used for search.

  • instance_type (Literal['node', 'edge'] | type[T_Node] | type[T_Edge]) – Whether to search for nodes or edges. You can also pass a custom typed node (or edge class) inheriting from TypedNode (or TypedEdge). See apply, retrieve_nodes or retrieve_edges for an example.

  • properties (list[str] | None) – Optional array of properties you want to search through. If you do not specify one or more properties, the service will search all text fields within the view.

  • target_units (list[TargetUnit] | None) – Properties to convert to another unit. The API can only convert to another unit if a unit has been defined as part of the type on the underlying container being queried.

  • space (str | SequenceNotStr[str] | None) – Restrict instance search to the given space (or list of spaces).

  • filter (Filter | dict[str, Any] | None) – Advanced filtering of instances.

  • include_typing (bool) – Whether to include typing information.

  • limit (int | None) – Maximum number of instances to return. Defaults to 25. Will return the maximum number of results (1000) if set to None, -1, or math.inf.

  • sort (Sequence[InstanceSort | dict] | InstanceSort | dict | None) – How you want the listed instances information ordered.

  • operator (Literal['AND', 'OR']) – Controls how multiple search terms are combined when matching documents. OR (default): A document matches if it contains any of the query terms in the searchable fields. This typically returns more results but with lower precision. AND: A document matches only if it contains all of the query terms across the searchable fields. This typically returns fewer results but with higher relevance.

Returns

Search result with matching nodes or edges.

Return type

NodeList[T_Node] | EdgeList[T_Edge]

Examples

Search for Arnold in the person view in the name property:

>>> from cognite.client import CogniteClient
>>> from cognite.client.data_classes.data_modeling import ViewId
>>> client = CogniteClient()
>>> res = client.data_modeling.instances.search(
...     ViewId("mySpace", "PersonView", "v1"),
...     query="Arnold",
...     properties=["name"],
... )

Search for Tarantino, Ritchie or Scorsese in the person view in the name property, but only born after 1942:

>>> from cognite.client.data_classes.data_modeling import ViewId
>>> from cognite.client.data_classes import filters
>>> born_after_1942 = filters.Range(["mySpace", "PersonView/v1", "birthYear"], gt=1942)
>>> res = client.data_modeling.instances.search(
...     ViewId("mySpace", "PersonView", "v1"),
...     query="Tarantino Ritchie Scorsese",
...     properties=["name"],
...     filter=born_after_1942,
...     operator="OR"
... )

Aggregate instances

InstancesAPI.aggregate(view: ViewId, aggregates: cognite.client.data_classes.aggregations.MetricAggregation | dict, group_by: None = None, instance_type: Literal['node', 'edge'] = 'node', query: str | None = None, properties: Optional[Union[str, SequenceNotStr[str]]] = None, target_units: list[cognite.client.data_classes.data_modeling.instances.TargetUnit] | None = None, space: Optional[Union[str, SequenceNotStr[str]]] = None, filter: cognite.client.data_classes.filters.Filter | dict[str, Any] | None = None, limit: int | None = DEFAULT_LIMIT_READ) AggregatedNumberedValue
InstancesAPI.aggregate(view: ViewId, aggregates: Sequence[cognite.client.data_classes.aggregations.MetricAggregation | dict], group_by: None = None, instance_type: Literal['node', 'edge'] = 'node', query: str | None = None, properties: Optional[Union[str, SequenceNotStr[str]]] = None, target_units: list[cognite.client.data_classes.data_modeling.instances.TargetUnit] | None = None, space: Optional[Union[str, SequenceNotStr[str]]] = None, filter: cognite.client.data_classes.filters.Filter | dict[str, Any] | None = None, limit: int | None = DEFAULT_LIMIT_READ) list[cognite.client.data_classes.aggregations.AggregatedNumberedValue]
InstancesAPI.aggregate(view: ViewId, aggregates: cognite.client.data_classes.aggregations.MetricAggregation | dict | collections.abc.Sequence[cognite.client.data_classes.aggregations.MetricAggregation | dict], group_by: Union[str, SequenceNotStr[str]], instance_type: Literal['node', 'edge'] = 'node', query: str | None = None, properties: Optional[Union[str, SequenceNotStr[str]]] = None, target_units: list[cognite.client.data_classes.data_modeling.instances.TargetUnit] | None = None, space: Optional[Union[str, SequenceNotStr[str]]] = None, filter: cognite.client.data_classes.filters.Filter | dict[str, Any] | None = None, limit: int | None = DEFAULT_LIMIT_READ) InstanceAggregationResultList

Aggregate data across nodes/edges

Parameters
  • view (ViewId) – View to aggregate over.

  • aggregates (MetricAggregation | dict | Sequence[MetricAggregation | dict]) – The properties to aggregate over.

  • group_by (str | SequenceNotStr[str] | None) – The selection of fields to group the results by when doing aggregations. You can specify up to 5 items to group by.

  • instance_type (Literal['node', 'edge']) – The type of instance.

  • query (str | None) – Optional query string. The API will parse the query string, and use it to match the text properties on elements to use for the aggregate(s).

  • properties (str | SequenceNotStr[str] | None) – Optional list of properties you want to apply the query to. If you do not list any properties, you search through text fields by default.

  • target_units (list[TargetUnit] | None) – Properties to convert to another unit. The API can only convert to another unit if a unit has been defined as part of the type on the underlying container being queried.

  • space (str | SequenceNotStr[str] | None) – Restrict instance aggregate query to the given space (or list of spaces).

  • filter (Filter | dict[str, Any] | None) – Advanced filtering of instances.

  • limit (int | None) – Maximum number of instances to return. Defaults to 25. Will return the maximum number of results (1000) if set to None, -1, or math.inf.

Returns

Node or edge aggregation results.

Return type

AggregatedNumberedValue | list[AggregatedNumberedValue] | InstanceAggregationResultList

Examples

Get the average run time in minutes for pumps grouped by release year:

>>> from cognite.client import CogniteClient
>>> from cognite.client.data_classes.data_modeling import ViewId, aggregations as aggs
>>> client = CogniteClient()
>>> avg_run_time = aggs.Avg("runTimeMinutes")
>>> view_id = ViewId("mySpace", "PumpView", "v1")
>>> res = client.data_modeling.instances.aggregate(view_id, avg_run_time, group_by="releaseYear")

Query instances

InstancesAPI.query(query: Query, include_typing: bool = False, debug: DebugParameters | None = None) QueryResult

Advanced query interface for nodes/edges.

The Data Modelling API exposes an advanced query interface. The query interface supports parameterization, recursive edge traversal, chaining of result sets, and granular property selection.

Parameters
  • query (Query) – Query.

  • include_typing (bool) – Should we return property type information as part of the result?

  • debug (DebugParameters | None) – Debug settings for profiling and troubleshooting.

Returns

The resulting nodes and/or edges from the query.

Return type

QueryResult

Examples

Find work orders created before 2023 sorted by title:

>>> from cognite.client import CogniteClient
>>> from cognite.client.data_classes.data_modeling.query import Query, Select, NodeResultSetExpression, EdgeResultSetExpression, SourceSelector
>>> from cognite.client.data_classes.filters import Range, Equals
>>> from cognite.client.data_classes.data_modeling.ids import ViewId
>>> client = CogniteClient()
>>> work_order_id = ViewId("mySpace", "WorkOrderView", "v1")
>>> pump_id = ViewId("mySpace", "PumpView", "v1")
>>> query = Query(
...     with_ = {
...         "work_orders": NodeResultSetExpression(filter=Range(work_order_id.as_property_ref("createdYear"), lt=2023)),
...         "work_orders_to_pumps": EdgeResultSetExpression(from_="work_orders", filter=Equals(["edge", "type"], {"space": work_order_id.space, "externalId": "WorkOrder.asset"})),
...         "pumps": NodeResultSetExpression(from_="work_orders_to_pumps"),
...     },
...     select = {
...         "pumps": Select(
...             [SourceSelector(pump_id, ["name"])], sort=[InstanceSort(pump_id.as_property_ref("name"))]),
...     },
... )
>>> res = client.data_modeling.instances.query(query)

To convert units, specify what your target units are in the SourceSelector. You can either use a UnitReference or a UnitSystemReference. Note that in order for a property to be converted, they need to have a unit defined in the underlying container.

>>> from cognite.client.data_classes.data_modeling.data_types import UnitReference, UnitSystemReference
>>> selected_source = SourceSelector(
...     source=ViewId("my-space", "my-xid", "v1"),
...     properties=["f32_prop1", "f32_prop2", "f64_prop1", "f64_prop2"],
...     target_units=[
...         TargetUnit("f32_prop1", UnitReference("pressure:kilopa")),
...         TargetUnit("f32_prop2", UnitReference("pressure:barg")),
...         TargetUnit("f64_prop1", UnitSystemReference("SI")),
...         TargetUnit("f64_prop2", UnitSystemReference("Imperial")),
...     ],
... )

To select all properties, use ‘[*]’ in your SourceSelector:

>>> SourceSelector(source=ViewId("my-space", "my-xid", "v1"), properties=["*"])

To debug and/or profile your query, you can use the debug parameter:

>>> from cognite.client.data_classes.data_modeling.debug import DebugParameters
>>> debug_params = DebugParameters(
...     emit_results=False,
...     include_plan=True,  # Include the postgres execution plan
...     include_translated_query=True,  # Include the internal representation of the query.
...     profile=True,
... )
>>> res = client.data_modeling.instances.query(query, debug=debug_params)
>>> print(res.debug)

Inspect instances

InstancesAPI.inspect(nodes: Optional[Union[NodeId, Sequence[NodeId], tuple[str, str], Sequence[tuple[str, str]]]] = None, edges: Optional[Union[EdgeId, Sequence[EdgeId], tuple[str, str], Sequence[tuple[str, str]]]] = None, *, involved_views: Optional[InvolvedViews] = None, involved_containers: Optional[InvolvedContainers] = None) InstanceInspectResults

Reverse lookup for instances.

This method will return the involved views and containers for the given nodes and edges.

Parameters
  • nodes (NodeId | Sequence[NodeId] | tuple[str, str] | Sequence[tuple[str, str]] | None) – Node IDs.

  • edges (EdgeId | Sequence[EdgeId] | tuple[str, str] | Sequence[tuple[str, str]] | None) – Edge IDs.

  • involved_views (InvolvedViews | None) – Whether to include involved views. Must pass at least one of involved_views or involved_containers.

  • involved_containers (InvolvedContainers | None) – Whether to include involved containers. Must pass at least one of involved_views or involved_containers.

Returns

List of instance inspection results.

Return type

InstanceInspectResults

Examples

Look up the involved views for a given node and edge:

>>> from cognite.client import CogniteClient
>>> from cognite.client.data_classes.data_modeling import NodeId, EdgeId, InvolvedViews
>>> client = CogniteClient()
>>> res = client.data_modeling.instances.inspect(
...     nodes=NodeId("my-space", "foo1"),
...     edges=EdgeId("my-space", "bar2"),
...     involved_views=InvolvedViews(all_versions=False),
... )

Look up the involved containers:

>>> from cognite.client.data_classes.data_modeling import InvolvedContainers
>>> res = client.data_modeling.instances.inspect(
...     nodes=[("my-space", "foo1"), ("my-space", "foo2")],
...     involved_containers=InvolvedContainers(),
... )

Sync instances

InstancesAPI.sync(query: Query, include_typing: bool = False, debug: DebugParameters | None = None) QueryResult

Subscription to changes for nodes/edges.

Subscribe to changes for nodes and edges in a project, matching a supplied filter.

Parameters
  • query (Query) – Query.

  • include_typing (bool) – Should we return property type information as part of the result?

  • debug (DebugParameters | None) – Debug settings for profiling and troubleshooting.

Returns

The resulting nodes and/or edges from the query.

Return type

QueryResult

Examples

Find work orders created before 2023 sorted by title:

>>> from cognite.client import CogniteClient
>>> from cognite.client.data_classes.data_modeling.instances import InstanceSort
>>> from cognite.client.data_classes.data_modeling.query import Query, Select, NodeResultSetExpression, EdgeResultSetExpression, SourceSelector
>>> from cognite.client.data_classes.filters import Range, Equals
>>> from cognite.client.data_classes.data_modeling.ids import ViewId
>>> client = CogniteClient()
>>> work_order_id = ViewId("mySpace", "WorkOrderView", "v1")
>>> pump_id = ViewId("mySpace", "PumpView", "v1")
>>> query = Query(
...     with_ = {
...         "work_orders": NodeResultSetExpression(filter=Range(work_order_id.as_property_ref("createdYear"), lt=2023)),
...         "work_orders_to_pumps": EdgeResultSetExpression(from_="work_orders", filter=Equals(["edge", "type"], {"space": work_order_id.space, "externalId": "WorkOrder.asset"})),
...         "pumps": NodeResultSetExpression(from_="work_orders_to_pumps"),
...     },
...     select = {
...         "pumps": Select(
...             [SourceSelector(pump_id, ["name"])], sort=[InstanceSort(pump_id.as_property_ref("name"))]),
...     },
... )
>>> res = client.data_modeling.instances.sync(query)
>>> # Added a new work order with pumps created before 2023
>>> query.cursors = res.cursors
>>> res_new = client.data_modeling.instances.sync(query)

In the last example, the res_new will only contain the pumps that have been added with the new work order.

To debug and/or profile your query, you can use the debug parameter:

>>> from cognite.client.data_classes.data_modeling.debug import DebugParameters
>>> debug_params = DebugParameters(
...     emit_results=False,
...     include_plan=True,  # Include the postgres execution plan
...     include_translated_query=True,  # Include the internal representation of the query.
...     profile=True,
... )
>>> res = client.data_modeling.instances.sync(query, debug=debug_params)
>>> print(res.debug)
InstancesAPI.subscribe(query: Query, callback: Callable[[QueryResult], None], poll_delay_seconds: float = 30, throttle_seconds: float = 1) SubscriptionContext

Subscribe to a query and get updates when the result set changes. This invokes the sync() method in a loop in a background thread.

We do not support chaining result sets when subscribing to a query.

Parameters
  • query (Query) – The query to subscribe to.

  • callback (Callable[[QueryResult], None]) – The callback function to call when the result set changes.

  • poll_delay_seconds (float) – The time to wait between polls when no data is present. Defaults to 30 seconds.

  • throttle_seconds (float) – The time to wait between polls despite data being present.

Returns

An object that can be used to cancel the subscription.

Return type

SubscriptionContext

Examples

Subscribe to a given query and print the changed data:

>>> from cognite.client import CogniteClient
>>> from cognite.client.data_classes.data_modeling.query import Query, QueryResult, NodeResultSetExpression, Select, SourceSelector
>>> from cognite.client.data_classes.data_modeling import ViewId
>>> from cognite.client.data_classes.filters import Range
>>>
>>> client = CogniteClient()
>>> def just_print_the_result(result: QueryResult) -> None:
...     print(result)
...
>>> view_id = ViewId("someSpace", "someView", "v1")
>>> filter = Range(view_id.as_property_ref("createdYear"), lt=2023)
>>> query = Query(
...     with_={"work_orders": NodeResultSetExpression(filter=filter)},
...     select={"work_orders": Select([SourceSelector(view_id, ["createdYear"])])}
... )
>>> subscription_context = client.data_modeling.instances.subscribe(query, just_print_the_result)
>>> subscription_context.cancel()

Example on syncing instances to local sqlite

import json
import time
import sqlite3

from cognite.client import CogniteClient
from cognite.client.data_classes.data_modeling.instances import (
    SubscriptionContext,
)
from cognite.client.data_classes.data_modeling.query import (
    QueryResult,
    Query,
    NodeResultSetExpression,
    Select,
)
from cognite.client.data_classes.filters import Equals

client = CogniteClient()


def sqlite_connection(db_name: str) -> sqlite3.Connection:
    return sqlite3.connect(db_name, check_same_thread=False)


def bootstrap_sqlite(db_name: str) -> None:
    with sqlite_connection(db_name) as connection:
        connection.execute(
            """
            CREATE TABLE IF NOT EXISTS instance (
                space TEXT,
                external_id TEXT,
                data JSON,
                PRIMARY KEY(space, external_id)
            )
            """
        )
        connection.execute("CREATE TABLE IF NOT EXISTS cursor (cursor TEXT)")


def sync_space_to_sqlite(
    db_name: str, space_to_sync: str
) -> SubscriptionContext:
    with sqlite_connection(db_name) as connection:
        existing_cursor = connection.execute(
            "SELECT cursor FROM cursor"
        ).fetchone()
        if existing_cursor:
            print("Found existing cursor, using that")

    query = Query(
        with_={
            "nodes": NodeResultSetExpression(
                filter=Equals(property=["node", "space"], value=space_to_sync)
            )
        },
        select={"nodes": Select()},
        cursors={"nodes": existing_cursor[0] if existing_cursor else None},
    )

    def _sync_batch_to_sqlite(result: QueryResult):
        with sqlite_connection(db_name) as connection:
            inserts = []
            deletes = []
            for node in result["nodes"]:
                if node.deleted_time is None:
                    inserts.append(
                        (node.space, node.external_id, json.dumps(node.dump()))
                    )
                else:
                    deletes.append((node.space, node.external_id))
            # Updates must be done in the same transaction as persisting the cursor.
            # A transaction is implicitly started by sqlite here.
            #
            # It is also important that deletes happen first as the same (space, external_id)
            # may appear as several tombstones and then a new instance, which must result in
            # the instance being saved.
            connection.executemany(
                "DELETE FROM instance WHERE space=? AND external_id=?", deletes
            )
            connection.executemany(
                "INSERT INTO instance VALUES (?, ?, ?) ON CONFLICT DO UPDATE SET data=excluded.data",
                inserts,
            )
            connection.execute(
                "INSERT INTO cursor VALUES (?)", [result.cursors["nodes"]]
            )
            connection.commit()
        print(f"Wrote {len(inserts)} nodes and deleted {len(deletes)} nodes")

    return client.data_modeling.instances.subscribe(query, _sync_batch_to_sqlite)


if __name__ == "__main__":
    SQLITE_DB_NAME = "test.db"
    SPACE_TO_SYNC = "mytestspace"
    bootstrap_sqlite(db_name=SQLITE_DB_NAME)
    sync_space_to_sqlite(db_name=SQLITE_DB_NAME, space_to_sync=SPACE_TO_SYNC)
    while True:
        # Keep main thread alive
        time.sleep(10)

Delete instances

InstancesAPI.delete(nodes: Optional[Union[NodeId, Sequence[NodeId], tuple[str, str], Sequence[tuple[str, str]]]] = None, edges: Optional[Union[EdgeId, Sequence[EdgeId], tuple[str, str], Sequence[tuple[str, str]]]] = None) InstancesDeleteResult

Delete one or more instances

Parameters
  • nodes (NodeId | Sequence[NodeId] | tuple[str, str] | Sequence[tuple[str, str]] | None) – Node ids

  • edges (EdgeId | Sequence[EdgeId] | tuple[str, str] | Sequence[tuple[str, str]] | None) – Edge ids

Returns

The instance(s) which has been deleted. Empty list if nothing was deleted.

Return type

InstancesDeleteResult

Examples

Delete instances by id:

>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> client.data_modeling.instances.delete(nodes=("mySpace", "myNode"))

Delete nodes and edges using the built in data class

>>> from cognite.client.data_classes.data_modeling import NodeId, EdgeId
>>> client.data_modeling.instances.delete(NodeId('mySpace', 'myNode'), EdgeId('mySpace', 'myEdge'))

Delete all nodes from a NodeList

>>> from cognite.client.data_classes.data_modeling import NodeId, EdgeId
>>> my_view = client.data_modeling.views.retrieve(('mySpace', 'myView'))
>>> my_nodes = client.data_modeling.instances.list(instance_type='node', sources=my_view, limit=None)
>>> client.data_modeling.instances.delete(nodes=my_nodes.as_ids())

Instances core data classes

class cognite.client.data_classes.data_modeling.instances.DataModelingInstancesList(resources: Iterable[Any], cognite_client: CogniteClient | None = None)

Bases: WriteableCogniteResourceList[T_WriteClass, T_Instance], ABC

extend(other: Iterable[Any]) None

S.extend(iterable) – extend sequence by appending elements from the iterable

get(instance_id: Optional[Union[InstanceId, tuple[str, str]]] = None, external_id: Optional[str] = None, *, id: Optional[Union[InstanceId, tuple[str, str]]] = None) Optional[T_Instance]

Get an instance from this list by instance ID.

Parameters
  • instance_id (InstanceId | tuple[str, str] | None) – The instance ID to get. A tuple on the form (space, external_id) is also accepted.

  • external_id (str | None) – The external ID of the instance to return. Will raise ValueError when ambiguous (in presence of multiple spaces).

  • id (InstanceId | tuple[str, str] | None) – (DEPRECATED) Backwards-compatible alias for instance_id. Will be removed in the next major version.

Returns

The requested instance if present, else None

Return type

T_Instance | None

to_pandas(camel_case: bool = False, convert_timestamps: bool = True, expand_properties: bool = False, remove_property_prefix: bool = True, **kwargs: Any) pd.DataFrame

Convert the instance into a pandas DataFrame. Note that if the properties column is expanded and there are keys in the metadata that already exist in the DataFrame, then an error will be raised by pandas during joining.

Parameters
  • camel_case (bool) – Convert column names to camel case (e.g. externalId instead of external_id). Does not apply to properties.

  • convert_timestamps (bool) – Convert known columns storing CDF timestamps (milliseconds since epoch) to datetime. Does not affect properties.

  • expand_properties (bool) – Expand the properties into separate columns. Note: Will change default to True in the next major version.

  • remove_property_prefix (bool) – Attempt to remove the view ID prefix from columns names of expanded properties. Requires data to be from a single view and that all property names do not conflict with base properties (e.g. ‘space’ or ‘type’). In such cases, a warning is issued and the prefix is kept.

  • **kwargs (Any) – For backwards compatibility.

Returns

The Cognite resource as a dataframe.

Return type

pd.DataFrame

class cognite.client.data_classes.data_modeling.instances.Edge(space: str, external_id: str, version: int, type: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], last_updated_time: int, created_time: int, start_node: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], end_node: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], deleted_time: int | None, properties: cognite.client.data_classes.data_modeling.instances.Properties | None)

Bases: Instance[EdgeApply]

An Edge. This is the read version of the edge.

Parameters
  • space (str) – The workspace for the edge, a unique identifier for the space.

  • external_id (str) – Combined with the space is the unique identifier of the edge.

  • version (int) – Current version of the edge.

  • type (DirectRelationReference | tuple[str, str]) – The type of edge.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • start_node (DirectRelationReference | tuple[str, str]) – Reference to the direct relation. The reference consists of a space and an external-id.

  • end_node (DirectRelationReference | tuple[str, str]) – Reference to the direct relation. The reference consists of a space and an external-id.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

  • properties (Properties | None) – No description.

as_apply() EdgeApply

This is a convenience function for converting the read to a write edge.

It makes the simplifying assumption that all properties are from the same view. Note that this is not true in general.

Returns

A write edge, EdgeApply

Return type

EdgeApply

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.instances.EdgeApply(space: str, external_id: str, type: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], start_node: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], end_node: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], existing_version: Optional[int] = None, sources: Optional[list[cognite.client.data_classes.data_modeling.instances.NodeOrEdgeData]] = None)

Bases: InstanceApply[EdgeApply]

An Edge. This is the write version of the edge.

Parameters
  • space (str) – The workspace for the edge, a unique identifier for the space.

  • external_id (str) – Combined with the space is the unique identifier of the edge.

  • type (DirectRelationReference | tuple[str, str]) – The type of edge.

  • start_node (DirectRelationReference | tuple[str, str]) – Reference to the direct relation. The reference consists of a space and an external-id.

  • end_node (DirectRelationReference | tuple[str, str]) – Reference to the direct relation. The reference consists of a space and an external-id.

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the edge (for the specified container or edge). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • sources (list[NodeOrEdgeData] | None) – List of source properties to write. The properties are from the edge and/or container the container(s) making up this node.

as_write() EdgeApply

Returns this EdgeApply instance

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.instances.EdgeApplyList(resources: Iterable[Any], cognite_client: CogniteClient | None = None)

Bases: CogniteResourceList[EdgeApply]

as_ids() list[cognite.client.data_classes.data_modeling.ids.EdgeId]

Convert the list of edges to a list of edge ids.

Returns

A list of edge ids.

Return type

list[EdgeId]

class cognite.client.data_classes.data_modeling.instances.EdgeApplyResult(space: str, external_id: str, version: int, was_modified: bool, last_updated_time: int, created_time: int)

Bases: InstanceApplyResult

An Edge. This represents the update on the edge.

Parameters
  • space (str) – The workspace for the edge, a unique identifier for the space.

  • external_id (str) – Combined with the space is the unique identifier of the edge.

  • version (int) – Current version of the edge.

  • was_modified (bool) – Whether the edge was modified by the ingestion.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

class cognite.client.data_classes.data_modeling.instances.EdgeApplyResultList(resources: Iterable[Any], cognite_client: CogniteClient | None = None)

Bases: CogniteResourceList[EdgeApplyResult]

as_ids() list[cognite.client.data_classes.data_modeling.ids.EdgeId]

Convert the list of edges to a list of edge ids.

Returns

A list of edge ids.

Return type

list[EdgeId]

class cognite.client.data_classes.data_modeling.instances.EdgeList(resources: Collection[Any], typing: TypeInformation | None = None, debug: DebugInfo | None = None, cognite_client: CogniteClient | None = None)

Bases: DataModelingInstancesList[EdgeApply, T_Edge]

as_ids() list[cognite.client.data_classes.data_modeling.ids.EdgeId]

Convert the list of edges to a list of edge ids.

Returns

A list of edge ids.

Return type

list[EdgeId]

as_write() EdgeApplyList

Returns this EdgeList as a EdgeApplyList

dump_raw(camel_case: bool = True) dict[str, Any]

This method dumps the list with extra information in addition to the items.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the list.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.instances.EdgeListWithCursor(resources: Collection[Any], cursor: str | None, typing: TypeInformation | None = None, debug: DebugInfo | None = None, cognite_client: CogniteClient | None = None)

Bases: EdgeList

extend(other: EdgeListWithCursor) None

S.extend(iterable) – extend sequence by appending elements from the iterable

class cognite.client.data_classes.data_modeling.instances.InspectOperation

Bases: ABC

class cognite.client.data_classes.data_modeling.instances.InspectionResults(involved_views: list[cognite.client.data_classes.data_modeling.ids.ViewId] | None, involved_containers: list[cognite.client.data_classes.data_modeling.ids.ContainerId] | None)

Bases: CogniteResource

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.instances.Instance(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, instance_type: Literal['node', 'edge'], deleted_time: int | None, properties: cognite.client.data_classes.data_modeling.instances.Properties | None)

Bases: WritableInstanceCore[T_CogniteResource], ABC

A node or edge. This is the read version of the instance.

Parameters
  • space (str) – The workspace for the instance, a unique identifier for the space.

  • external_id (str) – Combined with the space is the unique identifier of the instance.

  • version (int) – Current version of the instance.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • instance_type (Literal['node', 'edge']) – The type of instance.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

  • properties (Properties | None) – Properties of the instance.

abstract as_apply() InstanceApply

Convert the instance to an apply instance.

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

to_pandas(ignore: list[str] | None = None, camel_case: bool = False, convert_timestamps: bool = True, expand_properties: bool = False, remove_property_prefix: bool = True, **kwargs: Any) pd.DataFrame

Convert the instance into a pandas DataFrame.

Parameters
  • ignore (list[str] | None) – List of row keys to skip when converting to a data frame. Is applied before expansions.

  • camel_case (bool) – Convert attribute names to camel case (e.g. externalId instead of external_id). Does not affect properties if expanded.

  • convert_timestamps (bool) – Convert known attributes storing CDF timestamps (milliseconds since epoch) to datetime. Does not affect properties.

  • expand_properties (bool) – Expand the properties into separate rows. Note: Will change default to True in the next major version.

  • remove_property_prefix (bool) – Attempt to remove the view ID prefix from row names of expanded properties (in index). Requires data to be from a single view and that all property names do not conflict with base properties (e.g. ‘space’ or ‘type’). In such cases, a warning is issued and the prefix is kept.

  • **kwargs (Any) – For backwards compatibility.

Returns

The dataframe.

Return type

pd.DataFrame

class cognite.client.data_classes.data_modeling.instances.InstanceAggregationResult(aggregates: list[cognite.client.data_classes.aggregations.AggregatedNumberedValue], group: dict[str, str | int | float | bool])

Bases: DataModelingResource

Represents instances aggregation results.

Parameters
  • aggregates (list[AggregatedNumberedValue]) – List of aggregated values.

  • group (dict[str, str | int | float | bool]) – The grouping used for the aggregation.

dump(camel_case: bool = True) dict[str, Any]

Dumps the aggregation results to a dictionary.

Parameters

camel_case (bool) – Whether to convert the keys to camel case.

Returns

A dictionary with the instance results.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.instances.InstanceAggregationResultList(resources: Iterable[Any], cognite_client: CogniteClient | None = None)

Bases: CogniteResourceList[InstanceAggregationResult]

class cognite.client.data_classes.data_modeling.instances.InstanceApply(space: str, external_id: str, instance_type: Literal['node', 'edge'] = 'node', existing_version: Optional[int] = None, sources: Optional[list[cognite.client.data_classes.data_modeling.instances.NodeOrEdgeData]] = None)

Bases: WritableInstanceCore[T_CogniteResource], ABC

A node or edge. This is the write version of the instance.

Parameters
  • space (str) – The workspace for the instance, a unique identifier for the space.

  • external_id (str) – Combined with the space is the unique identifier of the instance.

  • instance_type (Literal['node', 'edge']) – The type of instance.

  • existing_version (int | None) – Fail the ingestion request if the instance’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the instance (for the specified container or instance). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the instance already exists. If skipOnVersionConflict is set on the ingestion request, then the instance will be skipped instead of failing the ingestion request.

  • sources (list[NodeOrEdgeData] | None) – List of source properties to write. The properties are from the instance and/or container the container(s) making up this node.

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.instances.InstanceApplyResult(instance_type: Literal['node', 'edge'], space: str, external_id: str, version: int, was_modified: bool, last_updated_time: int, created_time: int)

Bases: InstanceCore, ABC

A node or edge. This represents the update on the instance.

Parameters
  • instance_type (Literal['node', 'edge']) – The type of instance.

  • space (str) – The workspace for the instance, a unique identifier for the space.

  • external_id (str) – Combined with the space is the unique identifier of the instance.

  • version (int) – DMS version of the instance.

  • was_modified (bool) – Whether the instance was modified by the ingestion.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

class cognite.client.data_classes.data_modeling.instances.InstanceCore(space: str, external_id: str, instance_type: Literal['node', 'edge'])

Bases: DataModelingResource, ABC

A node or edge

Parameters
  • space (str) – The workspace for the instance, a unique identifier for the space.

  • external_id (str) – Combined with the space is the unique identifier of the instance.

  • instance_type (Literal['node', 'edge']) – The type of instance.

class cognite.client.data_classes.data_modeling.instances.InstanceInspectResult(space: str, external_id: str, instance_type: Literal['node', 'edge'], inspection_results: InspectionResults)

Bases: CogniteResource

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.instances.InstanceInspectResultList(resources: Iterable[Any], cognite_client: CogniteClient | None = None)

Bases: CogniteResourceList[InstanceInspectResult]

class cognite.client.data_classes.data_modeling.instances.InstanceInspectResults(nodes: 'InstanceInspectResultList', edges: 'InstanceInspectResultList')

Bases: object

class cognite.client.data_classes.data_modeling.instances.InstanceSort(property: list[str] | tuple[str, ...], direction: Literal['ascending', 'descending'] = 'ascending', nulls_first: Optional[bool] = None)

Bases: DataModelingSort

class cognite.client.data_classes.data_modeling.instances.InstancesApply(nodes: NodeApplyList, edges: EdgeApplyList)

Bases: object

This represents the write request of an instance query

Parameters
class cognite.client.data_classes.data_modeling.instances.InstancesApplyResult(nodes: NodeApplyResultList, edges: EdgeApplyResultList)

Bases: object

This represents the write result of an instance query

Parameters
class cognite.client.data_classes.data_modeling.instances.InstancesDeleteResult(nodes: list[cognite.client.data_classes.data_modeling.ids.NodeId], edges: list[cognite.client.data_classes.data_modeling.ids.EdgeId])

Bases: object

This represents the delete result of an instance query

Parameters
  • nodes (list[NodeId]) – A list of node ids.

  • edges (list[EdgeId]) – A list of edge ids.

class cognite.client.data_classes.data_modeling.instances.InstancesResult(nodes: NodeList[T_Node], edges: EdgeList[T_Edge])

Bases: Generic[T_Node, T_Edge]

This represents the read result of an instance query

Parameters
class cognite.client.data_classes.data_modeling.instances.InvolvedContainers

Bases: InspectOperation

class cognite.client.data_classes.data_modeling.instances.InvolvedViews(all_versions: 'bool' = False)

Bases: InspectOperation

class cognite.client.data_classes.data_modeling.instances.Node(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, deleted_time: int | None, properties: cognite.client.data_classes.data_modeling.instances.Properties | None, type: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str] | None)

Bases: Instance[NodeApply]

A node. This is the read version of the node.

Parameters
  • space (str) – The workspace for the node, a unique identifier for the space.

  • external_id (str) – Combined with the space is the unique identifier of the node.

  • version (int) – Current version of the node.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

  • properties (Properties | None) – Properties of the node.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

as_apply() NodeApply

This is a convenience function for converting the read to a write node.

It makes the simplifying assumption that all properties are from the same view. Note that this is not true in general.

Returns

A write node, NodeApply

Return type

NodeApply

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.instances.NodeApply(space: str, external_id: str, existing_version: Optional[int] = None, sources: Optional[list[cognite.client.data_classes.data_modeling.instances.NodeOrEdgeData]] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: InstanceApply[NodeApply]

A node. This is the write version of the node.

Parameters
  • space (str) – The workspace for the node, a unique identifier for the space.

  • external_id (str) – Combined with the space is the unique identifier of the node.

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the edge (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • sources (list[NodeOrEdgeData] | None) – List of source properties to write. The properties are from the node and/or container the container(s) making up this node.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

as_write() Self

Returns this NodeApply instance

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.instances.NodeApplyList(resources: Iterable[Any], cognite_client: CogniteClient | None = None)

Bases: CogniteResourceList[NodeApply]

as_ids() list[cognite.client.data_classes.data_modeling.ids.NodeId]

Convert the list of nodes to a list of node ids.

Returns

A list of node ids.

Return type

list[NodeId]

class cognite.client.data_classes.data_modeling.instances.NodeApplyResult(space: str, external_id: str, version: int, was_modified: bool, last_updated_time: int, created_time: int)

Bases: InstanceApplyResult

A node. This represents the update on the node.

Parameters
  • space (str) – The workspace for the node, a unique identifier for the space.

  • external_id (str) – Combined with the space is the unique identifier of the node.

  • version (int) – Current version of the node.

  • was_modified (bool) – Whether the node was modified by the ingestion.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

class cognite.client.data_classes.data_modeling.instances.NodeApplyResultList(resources: Iterable[Any], cognite_client: CogniteClient | None = None)

Bases: CogniteResourceList[NodeApplyResult]

as_ids() list[cognite.client.data_classes.data_modeling.ids.NodeId]

Convert the list of nodes to a list of node ids.

Returns

A list of node ids.

Return type

list[NodeId]

class cognite.client.data_classes.data_modeling.instances.NodeList(resources: Collection[Any], typing: TypeInformation | None = None, debug: DebugInfo | None = None, cognite_client: CogniteClient | None = None)

Bases: DataModelingInstancesList[NodeApply, T_Node]

as_ids() list[cognite.client.data_classes.data_modeling.ids.NodeId]

Convert the list of nodes to a list of node ids.

Returns

A list of node ids.

Return type

list[NodeId]

as_write() NodeApplyList

Returns this NodeList as a NodeApplyList

dump_raw(camel_case: bool = True) dict[str, Any]

This method dumps the list with extra information in addition to the items.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the list.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.instances.NodeListWithCursor(resources: Collection[Any], cursor: str | None, typing: TypeInformation | None = None, debug: DebugInfo | None = None, cognite_client: CogniteClient | None = None)

Bases: NodeList[T_Node]

extend(other: NodeListWithCursor) None

S.extend(iterable) – extend sequence by appending elements from the iterable

class cognite.client.data_classes.data_modeling.instances.NodeOrEdgeData(source: cognite.client.data_classes.data_modeling.ids.ContainerId | cognite.client.data_classes.data_modeling.ids.ViewId, properties: Mapping[str, Optional[Union[str, int, float, bool, dict, SequenceNotStr[str], Sequence[int], Sequence[float], Sequence[bool], Sequence[dict], NodeId, DirectRelationReference, date, datetime, Sequence[cognite.client.data_classes.data_modeling.ids.NodeId | cognite.client.data_classes.data_modeling.data_types.DirectRelationReference], Sequence[date], Sequence[datetime]]]])

Bases: CogniteObject

This represents the data values of a node or edge.

Parameters
  • source (ContainerId | ViewId) – The container or view the node or edge property is in

  • properties (Mapping[str, PropertyValue]) – The properties of the node or edge.

dump(camel_case: bool = True) dict

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.instances.Properties(properties: MutableMapping[ViewId, MutableMapping[str, str | int | float | bool | dict | list[str] | list[int] | list[float] | list[bool] | list[dict]]])

Bases: MutableMapping[ViewId | tuple[str, str] | tuple[str, str, str], MutableMapping[str, str | int | float | bool | dict | list[str] | list[int] | list[float] | list[bool] | list[dict]]]

get(view: cognite.client.data_classes.data_modeling.ids.ViewId | tuple[str, str] | tuple[str, str, str]) collections.abc.MutableMapping[str, str | int | float | bool | dict | list[str] | list[int] | list[float] | list[bool] | list[dict]] | None
get(view: cognite.client.data_classes.data_modeling.ids.ViewId | tuple[str, str] | tuple[str, str, str], default: Union[MutableMapping[str, str | int | float | bool | dict | list[str] | list[int] | list[float] | list[bool] | list[dict]], _T]) Union[MutableMapping[str, str | int | float | bool | dict | list[str] | list[int] | list[float] | list[bool] | list[dict]], _T]

D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.

items() a set-like object providing a view on D's items
keys() a set-like object providing a view on D's keys
values() an object providing a view on D's values
class cognite.client.data_classes.data_modeling.instances.PropertyOptions(identifier: Optional[str] = None)

Bases: object

This is a descriptor class for instance properties in a typed class.

It is used when you have a property that has a different name in the Data Model compared to the name in the Python class.

Parameters

identifier (str | None) – The name of the property in the Data Model. Defaults to the name of the property in the Python class.

class cognite.client.data_classes.data_modeling.instances.SubscriptionContext(last_successful_sync: 'datetime | None' = None, last_successful_callback: 'datetime | None' = None, _canceled: 'bool' = False, _thread: 'threading.Thread | None' = None)

Bases: object

class cognite.client.data_classes.data_modeling.instances.TargetUnit(property: 'str', unit: 'UnitReference | UnitSystemReference')

Bases: CogniteObject

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.instances.TypeInformation(data: Optional[dict[str, dict[str, dict[str, cognite.client.data_classes.data_modeling.instances.TypePropertyDefinition]]]] = None)

Bases: UserDict, CogniteObject

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.instances.TypePropertyDefinition(type: 'PropertyType', nullable: 'bool' = True, auto_increment: 'bool' = False, immutable: 'bool' = False, default_value: 'str | int | dict | None' = None, name: 'str | None' = None, description: 'str | None' = None)

Bases: CogniteObject

dump(camel_case: bool = True, return_flat_dict: bool = False) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.instances.TypedEdge(space: str, external_id: str, version: int, type: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], last_updated_time: int, created_time: int, start_node: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], end_node: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], deleted_time: int | None)

Bases: Edge, TypedInstance

class cognite.client.data_classes.data_modeling.instances.TypedEdgeApply(space: str, external_id: str, type: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], start_node: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], end_node: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], existing_version: Optional[int] = None)

Bases: EdgeApply, TypedInstance

class cognite.client.data_classes.data_modeling.instances.TypedInstance

Bases: ABC

class cognite.client.data_classes.data_modeling.instances.TypedNode(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, deleted_time: int | None, type: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str] | None)

Bases: Node, TypedInstance

class cognite.client.data_classes.data_modeling.instances.TypedNodeApply(space: str, external_id: str, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: NodeApply, TypedInstance

class cognite.client.data_classes.data_modeling.instances.WritableInstanceCore(space: str, external_id: str, instance_type: Literal['node', 'edge'])

Bases: WritableDataModelingResource[T_CogniteResource], ABC

Instances query data classes

class cognite.client.data_classes.data_modeling.query.EdgeResultSetExpression(from_: Optional[str] = None, max_distance: Optional[int] = None, direction: Literal['outwards', 'inwards'] = 'outwards', filter: Optional[Filter] = None, node_filter: Optional[Filter] = None, termination_filter: Optional[Filter] = None, limit_each: Optional[int] = None, sort: Optional[list[cognite.client.data_classes.data_modeling.instances.InstanceSort]] = None, post_sort: Optional[list[cognite.client.data_classes.data_modeling.instances.InstanceSort]] = None, limit: Optional[int] = None, chain_to: Literal['destination', 'source'] = 'destination', skip_already_deleted: bool = True, sync_mode: Optional[Literal['one_phase', 'two_phase', 'no_backfill']] = None, backfill_sort: Optional[list[cognite.client.data_classes.data_modeling.instances.InstanceSort]] = None)

Bases: NodeOrEdgeResultSetExpression

Describes how to query for edges in the data model.

Parameters
  • from (str | None) – Chain your result expression from this edge.

  • max_distance (int | None) – The largest - max - number of levels to traverse.

  • direction (Literal['outwards', 'inwards']) – The direction to use when traversing.

  • filter (Filter | None) – Filter the result set based on this filter.

  • node_filter (Filter | None) – Filter the result set based on this filter.

  • termination_filter (Filter | None) – Filter the result set based on this filter.

  • limit_each (int | None) – Limit the number of returned edges for each of the source nodes in the result set. The indicated uniform limit applies to the result set from the referenced from. limitEach only has meaning when you also specify maxDistance=1 and from.

  • sort (list[InstanceSort] | None) – Sort the result set based on this list of sort criteria.

  • post_sort (list[InstanceSort] | None) – Sort the result set based on this list of sort criteria.

  • limit (int | None) – Limit the result set to this number of instances.

  • chain_to (Literal['destination', 'source']) – Control which side of the edge to chain to. The chain_to option is only applicable if the result rexpression referenced in from contains edges. source will chain to start if you’re following edges outwards i.e direction=outwards. If you’re following edges inwards i.e direction=inwards, it will chain to end. destination (default) will chain to end if you’re following edges outwards i.e direction=outwards. If you’re following edges inwards i.e, direction=inwards, it will chain to start.

  • skip_already_deleted (bool) – If set to False, the API will return instances that have been soft deleted before sync was initiated. Soft deletes that happen after the sync is initiated and a cursor generated, are always included in the result. Soft deleted instances are identified by having deletedTime set.

  • sync_mode (Literal['one_phase', 'two_phase', 'no_backfill'] | None) – Specify whether to sync instances in a single phase; in a backfill phase followed by live updates, or without any backfill. Only valid for sync operations.

  • backfill_sort (list[InstanceSort] | None) – Sort the result set during the backfill phase of a two phase sync. Only valid with sync_mode = “two_phase”. The sort must be backed by a cursorable index.

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.query.Intersection(intersection: Sequence[str | cognite.client.data_classes.data_modeling.query.SetOperation], except_: Optional[SequenceNotStr[str]] = None, limit: Optional[int] = None)

Bases: SetOperation

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.query.NodeOrEdgeResultSetExpression(from_: str | None, filter: cognite.client.data_classes.filters.Filter | None, limit: int | None, sort: list[cognite.client.data_classes.data_modeling.instances.InstanceSort] | None, direction: Literal['outwards', 'inwards'] = 'outwards', chain_to: Literal['destination', 'source'] = 'destination', skip_already_deleted: bool = True, sync_mode: Optional[Literal['one_phase', 'two_phase', 'no_backfill']] = None, backfill_sort: Optional[list[cognite.client.data_classes.data_modeling.instances.InstanceSort]] = None)

Bases: ResultSetExpression, ABC

class cognite.client.data_classes.data_modeling.query.NodeResultSetExpression(from_: Optional[str] = None, filter: Optional[Filter] = None, sort: Optional[list[cognite.client.data_classes.data_modeling.instances.InstanceSort]] = None, limit: Optional[int] = None, through: Optional[Union[list[str], tuple[str, str, str], PropertyId]] = None, direction: Literal['outwards', 'inwards'] = 'outwards', chain_to: Literal['destination', 'source'] = 'destination', skip_already_deleted: bool = True, sync_mode: Optional[Literal['one_phase', 'two_phase', 'no_backfill']] = None, backfill_sort: Optional[list[cognite.client.data_classes.data_modeling.instances.InstanceSort]] = None)

Bases: NodeOrEdgeResultSetExpression

Describes how to query for nodes in the data model.

Parameters
  • from (str | None) – Chain your result-expression based on this view.

  • filter (Filter | None) – Filter the result set based on this filter.

  • sort (list[InstanceSort] | None) – Sort the result set based on this list of sort criteria.

  • limit (int | None) – Limit the result set to this number of instances.

  • through (list[str] | tuple[str, str, str] | PropertyId | None) – Chain your result-expression through this container or view. The property must be a reference to a direct relation property. from_ must be defined. The tuple must be on the form (space, container, property) or (space, view/version, property).

  • direction (Literal['outwards', 'inwards']) – The direction to use when traversing direct relations. Only applicable when through is specified.

  • chain_to (Literal['destination', 'source']) – Control which side of the edge to chain to. The chain_to option is only applicable if the result rexpression referenced in from contains edges. source will chain to start if you’re following edges outwards i.e direction=outwards. If you’re following edges inwards i.e direction=inwards, it will chain to end. destination (default) will chain to end if you’re following edges outwards i.e direction=outwards. If you’re following edges inwards i.e, direction=inwards, it will chain to start.

  • skip_already_deleted (bool) – If set to False, the API will return instances that have been soft deleted before sync was initiated. Soft deletes that happen after the sync is initiated and a cursor generated, are always included in the result. Soft deleted instances are identified by having deletedTime set.

  • sync_mode (Literal['one_phase', 'two_phase', 'no_backfill'] | None) – Specify whether to sync instances in a single phase; in a backfill phase followed by live updates, or without any backfill. Only valid for sync operations.

  • backfill_sort (list[InstanceSort] | None) – Sort the result set during the backfill phase of a two phase sync. Only valid with sync_mode = “two_phase”. The sort must be backed by a cursorable index.

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.query.Query(with_: dict[str, cognite.client.data_classes.data_modeling.query.ResultSetExpression], select: dict[str, cognite.client.data_classes.data_modeling.query.Select], parameters: Optional[dict[str, str | int | float | bool | dict | list[str] | list[int] | list[float] | list[bool] | list[dict]]] = None, cursors: Optional[Mapping[str, str | None]] = None)

Bases: CogniteObject

Query allows you to do advanced queries on the data model.

Parameters
  • with (dict[str, ResultSetExpression]) – A dictionary of result set expressions to use in the query. The keys are used to reference the result set expressions in the select and parameters.

  • select (dict[str, Select]) – A dictionary of select expressions to use in the query. The keys must match the keys in the with_ dictionary. The select expressions define which properties to include in the result set.

  • parameters (dict[str, PropertyValue] | None) – Values in filters can be parameterised. Parameters are provided as part of the query object, and referenced in the filter itself.

  • cursors (Mapping[str, str | None] | None) – A dictionary of cursors to use in the query. These are for pagination purposes, for example, in the sync endpoint.

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.query.QueryResult(*args: Any, **kwargs: Any)

Bases: UserDict

class cognite.client.data_classes.data_modeling.query.ResultSetExpression

Bases: CogniteObject, ABC

class cognite.client.data_classes.data_modeling.query.Select(sources: 'list[SourceSelector]' = <factory>, sort: 'list[InstanceSort]' = <factory>, limit: 'int | None' = None)

Bases: CogniteObject

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.query.SetOperation(except_: Optional[SequenceNotStr[str]] = None, limit: Optional[int] = None)

Bases: ResultSetExpression, ABC

class cognite.client.data_classes.data_modeling.query.SourceSelector(source: 'ViewId', properties: 'list[str] | None' = None, target_units: 'list[TargetUnit] | None' = None)

Bases: CogniteObject

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.query.Union(union: Sequence[str | cognite.client.data_classes.data_modeling.query.SetOperation], except_: Optional[SequenceNotStr[str]] = None, limit: Optional[int] = None)

Bases: SetOperation

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.query.UnionAll(union_all: Sequence[str | cognite.client.data_classes.data_modeling.query.SetOperation], except_: Optional[SequenceNotStr[str]] = None, limit: Optional[int] = None)

Bases: SetOperation

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

Data Modeling ID data classes

class cognite.client.data_classes.data_modeling.ids.AbstractDataclass(*args: 'Any', **kwargs: 'Any')

Bases: ABC

class cognite.client.data_classes.data_modeling.ids.ContainerId(space: 'str', external_id: 'str')

Bases: DataModelingId

class cognite.client.data_classes.data_modeling.ids.DataModelId(space: 'str', external_id: 'str', version: 'str | None' = None)

Bases: VersionedDataModelingId

class cognite.client.data_classes.data_modeling.ids.DataModelingId(space: 'str', external_id: 'str')

Bases: AbstractDataclass

class cognite.client.data_classes.data_modeling.ids.EdgeId(space: 'str', external_id: 'str')

Bases: InstanceId

class cognite.client.data_classes.data_modeling.ids.IdLike(*args, **kwargs)

Bases: Protocol

class cognite.client.data_classes.data_modeling.ids.NodeId(space: 'str', external_id: 'str')

Bases: InstanceId

class cognite.client.data_classes.data_modeling.ids.PropertyId(source: 'ViewId | ContainerId', property: 'str')

Bases: CogniteObject

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns

A dictionary representation of the instance.

Return type

dict[str, Any]

class cognite.client.data_classes.data_modeling.ids.VersionedDataModelingId(space: 'str', external_id: 'str', version: 'str | None' = None)

Bases: AbstractDataclass

class cognite.client.data_classes.data_modeling.ids.VersionedIdLike(*args, **kwargs)

Bases: IdLike, Protocol

class cognite.client.data_classes.data_modeling.ids.ViewId(space: 'str', external_id: 'str', version: 'str | None' = None)

Bases: VersionedDataModelingId

Statistics

Project

StatisticsAPI.project() ProjectStatistics

Retrieve project-wide usage data and limits

Returns the usage data and limits for a project’s data modelling usage, including data model schemas and graph instances

Returns

The requested statistics and limits

Return type

ProjectStatistics

Examples

Fetch project statistics (and limits) and check the current number of data models vs. and how many more can be created:

>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> stats = client.data_modeling.statistics.project()
>>> data_model_count = stats.data_models.count
>>> available_count = stats.data_models.limit - data_model_count

Retrieve space statistics

SpaceStatisticsAPI.retrieve(space: str) cognite.client.data_classes.data_modeling.statistics.SpaceStatistics | None
SpaceStatisticsAPI.retrieve(space: SequenceNotStr[str]) SpaceStatisticsList

Retrieve usage data and limits per space

Parameters

space (str | SequenceNotStr[str]) – The space or spaces to retrieve statistics for.

Returns

The requested statistics and limits for the specified space(s).

Return type

SpaceStatistics | SpaceStatisticsList | None

Examples

Fetch statistics for a single space:

>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> result = client.data_modeling.statistics.spaces.retrieve("my-space")
Fetch statistics for multiple spaces:
>>> res = client.data_modeling.statistics.spaces.retrieve(
...     ["my-space1", "my-space2"]
... )

List space statistics

SpaceStatisticsAPI.list() SpaceStatisticsList

Retrieve usage for all spaces

Returns statistics for data modeling resources grouped by each space in the project.

Returns

The requested statistics and limits for all spaces in the project.

Return type

SpaceStatisticsList

Examples

Fetch statistics for all spaces in the project:

>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> stats = client.data_modeling.statistics.spaces.list()
>>> for space_stats in stats:
...     print(f"Space: {space_stats.space}, Nodes: {space_stats.nodes}")

Data modeling statistics data classes

class cognite.client.data_classes.data_modeling.statistics.CountLimit(count: int, limit: int)

Bases: CogniteObject

Usage and limits for a specific resource in the data modeling API.

count

The current usage count for the resource.

Type

int

limit

The maximum allowed limit for the resource.

Type

int

class cognite.client.data_classes.data_modeling.statistics.InstanceStatistics(edges: int, soft_deleted_edges: int, nodes: int, soft_deleted_nodes: int, instances: int, instances_limit: int, soft_deleted_instances: int, soft_deleted_instances_limit: int)

Bases: CogniteObject

Statistics for instances in the data modeling API.

edges

Number of edges in the project.

Type

int

soft_deleted_edges

Number of soft-deleted edges in the project.

Type

int

nodes

Number of nodes in the project.

Type

int

soft_deleted_nodes

Number of soft-deleted nodes in the project.

Type

int

instances

Total number of instances in the project.

Type

int

instances_limit

Maximum number of instances allowed in the project.

Type

int

soft_deleted_instances

Total number of soft-deleted instances in the project.

Type

int

soft_deleted_instances_limit

Maximum number of soft-deleted instances allowed in the project.

Type

int

class cognite.client.data_classes.data_modeling.statistics.ProjectStatistics(spaces: CountLimit, containers: CountLimit, views: CountLimit, data_models: CountLimit, container_properties: CountLimit, instances: InstanceStatistics, concurrent_read_limit: int, concurrent_write_limit: int, concurrent_delete_limit: int)

Bases: CogniteResource

Statistics for a project in the data modeling API.

spaces

Usage and limits for spaces in the project

Type

CountLimit

containers

Usage and limits for containers in the project

Type

CountLimit

views

Usage and limits for views including all versions in the project

Type

CountLimit

data_models

Usage and limits for data models including all versions in the project

Type

CountLimit

container_properties

Usage and limits for sum of container properties in the project

Type

CountLimit

instances

Usage and limits for number of instances in the project

Type

InstanceStatistics

concurrent_read_limit

Maximum number of concurrent read operations allowed in the project

Type

int

concurrent_write_limit

Maximum number of concurrent write operations allowed in the project

Type

int

concurrent_delete_limit

Maximum number of concurrent delete operations allowed in the project

Type

int

dump(camel_case: bool = True) dict[str, Any]

Dump the object to a dictionary.

property project: str

The project name.

class cognite.client.data_classes.data_modeling.statistics.SpaceStatistics(space: str, containers: int, views: int, data_models: int, edges: int, soft_deleted_edges: int, nodes: int, soft_deleted_nodes: int)

Bases: CogniteResource

Statistics for a space in the data modeling API.

space

The space name

Type

str

containers

Number of containers in the space.

Type

int

views

Number of views in the space.

Type

int

data_models

Number of data models in the space.

Type

int

nodes

Number of nodes in the space.

Type

int

edges

Number of edges in the space.

Type

int

soft_deleted_nodes

Number of soft-deleted nodes in the space.

Type

int

soft_deleted_edges

Number of soft-deleted edges in the space.

Type

int

class cognite.client.data_classes.data_modeling.statistics.SpaceStatisticsList(resources: Iterable[Any], cognite_client: CogniteClient | None = None)

Bases: CogniteResourceList[SpaceStatistics]

GraphQL

Apply DML

DataModelingGraphQLAPI.apply_dml(id: cognite.client.data_classes.data_modeling.ids.DataModelId | tuple[str, str] | tuple[str, str, str], dml: str, name: Optional[str] = None, description: Optional[str] = None, previous_version: Optional[str] = None) DMLApplyResult

Apply the DML for a given data model.

Parameters
  • id (DataModelIdentifier) – The data model to apply DML to.

  • dml (str) – The DML to apply.

  • name (str | None) – The name of the data model.

  • description (str | None) – The description of the data model.

  • previous_version (str | None) – The previous version of the data model. Specify to reuse view versions from previous data model version.

Returns

The id of the updated data model.

Return type

DMLApplyResult

Examples

Apply DML:

>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> res = client.data_modeling.graphql.apply_dml(
...     id=("mySpaceExternalId", "myModelExternalId", "1"),
...     dml="type MyType { id: String! }",
...     name="My model name",
...     description="My model description"
... )

Execute GraphQl query

DataModelingGraphQLAPI.query(id: cognite.client.data_classes.data_modeling.ids.DataModelId | tuple[str, str] | tuple[str, str, str], query: str, variables: Optional[dict[str, Any]] = None) dict[str, Any]

Execute a GraphQl query against a given data model.

Parameters
  • id (DataModelIdentifier) – The data model to query.

  • query (str) – The query to issue.

  • variables (dict[str, Any] | None) – An optional dict of variables to pass to the query.

Returns

The query result

Return type

dict[str, Any]

Examples

Execute a graphql query against a given data model:

>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> res = client.data_modeling.graphql.query(
...     id=("mySpace", "myDataModel", "v1"),
...     query="listThings { items { thingProperty } }",
... )

Core Data Model

class cognite.client.data_classes.data_modeling.cdm.v1.Cognite360Image(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, translation_x: Optional[float] = None, translation_y: Optional[float] = None, translation_z: Optional[float] = None, euler_rotation_x: Optional[float] = None, euler_rotation_y: Optional[float] = None, euler_rotation_z: Optional[float] = None, scale_x: Optional[float] = None, scale_y: Optional[float] = None, scale_z: Optional[float] = None, front: Optional[DirectRelationReference] = None, back: Optional[DirectRelationReference] = None, left: Optional[DirectRelationReference] = None, right: Optional[DirectRelationReference] = None, top: Optional[DirectRelationReference] = None, bottom: Optional[DirectRelationReference] = None, collection_360: Optional[DirectRelationReference] = None, station_360: Optional[DirectRelationReference] = None, taken_at: Optional[datetime] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _Cognite360ImageProperties, TypedNode

This represents the reading format of Cognite 360 image.

It is used when data is read from CDF.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite 360 image.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • translation_x (float | None) – The displacement of the object along the X-axis in the 3D coordinate system

  • translation_y (float | None) – The displacement of the object along the Y-axis in the 3D coordinate system

  • translation_z (float | None) – The displacement of the object along the Z-axis in the 3D coordinate system

  • euler_rotation_x (float | None) – The rotation of the object around the X-axis in radians

  • euler_rotation_y (float | None) – The rotation of the object around the Y-axis in radians

  • euler_rotation_z (float | None) – The rotation of the object around the Z-axis in radians

  • scale_x (float | None) – The scaling factor applied to the object along the X-axis

  • scale_y (float | None) – The scaling factor applied to the object along the Y-axis

  • scale_z (float | None) – The scaling factor applied to the object along the Z-axis

  • front (DirectRelationReference | None) – Direct relation to a file holding the front projection of the cube map

  • back (DirectRelationReference | None) – Direct relation to a file holding the back projection of the cube map

  • left (DirectRelationReference | None) – Direct relation to a file holding the left projection of the cube map

  • right (DirectRelationReference | None) – Direct relation to a file holding the right projection of the cube map

  • top (DirectRelationReference | None) – Direct relation to a file holding the top projection of the cube map

  • bottom (DirectRelationReference | None) – Direct relation to a file holding the bottom projection of the cube map

  • collection_360 (DirectRelationReference | None) – Direct relation to Cognite360ImageCollection

  • station_360 (DirectRelationReference | None) – Direct relation to Cognite3DGroup instance that groups different Cognite360Image instances to the same station

  • taken_at (datetime | None) – The timestamp when the 6 photos were taken

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.Cognite360ImageAnnotation(space: str, external_id: str, type: DirectRelationReference, start_node: DirectRelationReference, end_node: DirectRelationReference, version: int, last_updated_time: int, created_time: int, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, source_id: Optional[str] = None, source_context: Optional[str] = None, source: Optional[DirectRelationReference] = None, source_created_time: Optional[datetime] = None, source_updated_time: Optional[datetime] = None, source_created_user: Optional[str] = None, source_updated_user: Optional[str] = None, confidence: Optional[float] = None, status: Optional[Literal['Approved', 'Rejected', 'Suggested']] = None, polygon: Optional[list[float]] = None, format_version: Optional[str] = None, deleted_time: Optional[int] = None)

Bases: _Cognite360ImageAnnotationProperties, TypedEdge

This represents the reading format of Cognite 360 image annotation.

It is used when data is read from CDF.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite 360 image annotation.

  • type (DirectRelationReference) – The type of edge.

  • start_node (DirectRelationReference) – Reference to the direct relation. The reference consists of a space and an external-id.

  • end_node (DirectRelationReference) – Reference to the direct relation. The reference consists of a space and an external-id.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • source_id (str | None) – Identifier from the source system

  • source_context (str | None) – Context of the source id. For systems where the sourceId is globally unique, the sourceContext is expected to not be set.

  • source (DirectRelationReference | None) – Direct relation to a source system

  • source_created_time (datetime | None) – When the instance was created in source system (if available)

  • source_updated_time (datetime | None) – When the instance was last updated in the source system (if available)

  • source_created_user (str | None) – User identifier from the source system on who created the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_updated_user (str | None) – User identifier from the source system on who last updated the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • confidence (float | None) – The confidence that the annotation is a good match

  • status (Literal['Approved', 'Rejected', 'Suggested'] | None) – The status of the annotation

  • polygon (list[float] | None) – List of floats representing the polygon. Format depends on formatVersion

  • format_version (str | None) – Specifies the storage representation for the polygon

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.Cognite360ImageAnnotationApply(space: str, external_id: str, type: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], start_node: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], end_node: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, source_id: Optional[str] = None, source_context: Optional[str] = None, source: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, source_created_time: Optional[datetime] = None, source_updated_time: Optional[datetime] = None, source_created_user: Optional[str] = None, source_updated_user: Optional[str] = None, confidence: Optional[float] = None, status: Optional[Literal['Approved', 'Rejected', 'Suggested']] = None, polygon: Optional[list[float]] = None, format_version: Optional[str] = None, existing_version: Optional[int] = None)

Bases: _Cognite360ImageAnnotationProperties, TypedEdgeApply

This represents the writing format of Cognite 360 image annotation.

It is used when data is written to CDF.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite 360 image annotation.

  • type (DirectRelationReference | tuple[str, str]) – The type of edge.

  • start_node (DirectRelationReference | tuple[str, str]) – Reference to the direct relation. The reference consists of a space and an external-id.

  • end_node (DirectRelationReference | tuple[str, str]) – Reference to the direct relation. The reference consists of a space and an external-id.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • source_id (str | None) – Identifier from the source system

  • source_context (str | None) – Context of the source id. For systems where the sourceId is globally unique, the sourceContext is expected to not be set.

  • source (DirectRelationReference | tuple[str, str] | None) – Direct relation to a source system

  • source_created_time (datetime | None) – When the instance was created in source system (if available)

  • source_updated_time (datetime | None) – When the instance was last updated in the source system (if available)

  • source_created_user (str | None) – User identifier from the source system on who created the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_updated_user (str | None) – User identifier from the source system on who last updated the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • confidence (float | None) – The confidence that the annotation is a good match

  • status (Literal['Approved', 'Rejected', 'Suggested'] | None) – The status of the annotation

  • polygon (list[float] | None) – List of floats representing the polygon. Format depends on formatVersion

  • format_version (str | None) – Specifies the storage representation for the polygon

  • existing_version (int | None) – Fail the ingestion request if the edge’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the edge (for the specified container or edge). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

class cognite.client.data_classes.data_modeling.cdm.v1.Cognite360ImageApply(space: str, external_id: str, *, translation_x: Optional[float] = None, translation_y: Optional[float] = None, translation_z: Optional[float] = None, euler_rotation_x: Optional[float] = None, euler_rotation_y: Optional[float] = None, euler_rotation_z: Optional[float] = None, scale_x: Optional[float] = None, scale_y: Optional[float] = None, scale_z: Optional[float] = None, front: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, back: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, left: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, right: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, top: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, bottom: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, collection_360: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, station_360: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, taken_at: Optional[datetime] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _Cognite360ImageProperties, TypedNodeApply

This represents the writing format of Cognite 360 image.

It is used when data is written to CDF.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite 360 image.

  • translation_x (float | None) – The displacement of the object along the X-axis in the 3D coordinate system

  • translation_y (float | None) – The displacement of the object along the Y-axis in the 3D coordinate system

  • translation_z (float | None) – The displacement of the object along the Z-axis in the 3D coordinate system

  • euler_rotation_x (float | None) – The rotation of the object around the X-axis in radians

  • euler_rotation_y (float | None) – The rotation of the object around the Y-axis in radians

  • euler_rotation_z (float | None) – The rotation of the object around the Z-axis in radians

  • scale_x (float | None) – The scaling factor applied to the object along the X-axis

  • scale_y (float | None) – The scaling factor applied to the object along the Y-axis

  • scale_z (float | None) – The scaling factor applied to the object along the Z-axis

  • front (DirectRelationReference | tuple[str, str] | None) – Direct relation to a file holding the front projection of the cube map

  • back (DirectRelationReference | tuple[str, str] | None) – Direct relation to a file holding the back projection of the cube map

  • left (DirectRelationReference | tuple[str, str] | None) – Direct relation to a file holding the left projection of the cube map

  • right (DirectRelationReference | tuple[str, str] | None) – Direct relation to a file holding the right projection of the cube map

  • top (DirectRelationReference | tuple[str, str] | None) – Direct relation to a file holding the top projection of the cube map

  • bottom (DirectRelationReference | tuple[str, str] | None) – Direct relation to a file holding the bottom projection of the cube map

  • collection_360 (DirectRelationReference | tuple[str, str] | None) – Direct relation to Cognite360ImageCollection

  • station_360 (DirectRelationReference | tuple[str, str] | None) – Direct relation to Cognite3DGroup instance that groups different Cognite360Image instances to the same station

  • taken_at (datetime | None) – The timestamp when the 6 photos were taken

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.Cognite360ImageCollection(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, status: Optional[Literal['Done', 'Failed', 'Processing', 'Queued']] = None, published: Optional[bool] = None, revision_type: Optional[Literal['CAD', 'Image360', 'PointCloud']] = None, model_3d: Optional[DirectRelationReference] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _Cognite360ImageCollectionProperties, TypedNode

This represents the reading format of Cognite 360 image collection.

It is used when data is read from CDF.

Represents a logical collection of Cognite360Image instances

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite 360 image collection.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • status (Literal['Done', 'Failed', 'Processing', 'Queued'] | None) – The status field.

  • published (bool | None) – The published field.

  • revision_type (Literal['CAD', 'Image360', 'PointCloud'] | None) – The revision type field.

  • model_3d (DirectRelationReference | None) – The model 3d field.

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.Cognite360ImageCollectionApply(space: str, external_id: str, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, status: Optional[Literal['Done', 'Failed', 'Processing', 'Queued']] = None, published: Optional[bool] = None, revision_type: Optional[Literal['CAD', 'Image360', 'PointCloud']] = None, model_3d: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _Cognite360ImageCollectionProperties, TypedNodeApply

This represents the writing format of Cognite 360 image collection.

It is used when data is written to CDF.

Represents a logical collection of Cognite360Image instances

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite 360 image collection.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • status (Literal['Done', 'Failed', 'Processing', 'Queued'] | None) – The status field.

  • published (bool | None) – The published field.

  • revision_type (Literal['CAD', 'Image360', 'PointCloud'] | None) – The revision type field.

  • model_3d (DirectRelationReference | tuple[str, str] | None) – The model 3d field.

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.Cognite360ImageModel(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, model_type: Optional[Literal['CAD', 'Image360', 'PointCloud']] = None, thumbnail: Optional[DirectRelationReference] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _Cognite360ImageModelProperties, TypedNode

This represents the reading format of Cognite 360 image model.

It is used when data is read from CDF.

Navigational aid for traversing Cognite360ImageModel instances

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite 360 image model.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • model_type (Literal['CAD', 'Image360', 'PointCloud'] | None) – CAD, PointCloud or Image360

  • thumbnail (DirectRelationReference | None) – Thumbnail of the 3D model

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.Cognite360ImageModelApply(space: str, external_id: str, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, model_type: Optional[Literal['CAD', 'Image360', 'PointCloud']] = None, thumbnail: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _Cognite360ImageModelProperties, TypedNodeApply

This represents the writing format of Cognite 360 image model.

It is used when data is written to CDF.

Navigational aid for traversing Cognite360ImageModel instances

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite 360 image model.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • model_type (Literal['CAD', 'Image360', 'PointCloud'] | None) – CAD, PointCloud or Image360

  • thumbnail (DirectRelationReference | tuple[str, str] | None) – Thumbnail of the 3D model

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.Cognite360ImageStation(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, group_type: Optional[Literal['Station360']] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _Cognite360ImageStationProperties, TypedNode

This represents the reading format of Cognite 360 image station.

It is used when data is read from CDF.

A way to group images across collections. Used for creating visual scan history

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite 360 image station.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • group_type (Literal['Station360'] | None) – Type of group

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.Cognite360ImageStationApply(space: str, external_id: str, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, group_type: Optional[Literal['Station360']] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _Cognite360ImageStationProperties, TypedNodeApply

This represents the writing format of Cognite 360 image station.

It is used when data is written to CDF.

A way to group images across collections. Used for creating visual scan history

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite 360 image station.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • group_type (Literal['Station360'] | None) – Type of group

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.Cognite3DModel(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, model_type: Optional[Literal['CAD', 'Image360', 'PointCloud']] = None, thumbnail: Optional[DirectRelationReference] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _Cognite3DModelProperties, TypedNode

This represents the reading format of Cognite 3D model.

It is used when data is read from CDF.

Groups revisions of 3D data of various kinds together (CAD, PointCloud, Image360)

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite 3D model.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • model_type (Literal['CAD', 'Image360', 'PointCloud'] | None) – CAD, PointCloud or Image360

  • thumbnail (DirectRelationReference | None) – Thumbnail of the 3D model

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.Cognite3DModelApply(space: str, external_id: str, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, model_type: Optional[Literal['CAD', 'Image360', 'PointCloud']] = None, thumbnail: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _Cognite3DModelProperties, TypedNodeApply

This represents the writing format of Cognite 3D model.

It is used when data is written to CDF.

Groups revisions of 3D data of various kinds together (CAD, PointCloud, Image360)

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite 3D model.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • model_type (Literal['CAD', 'Image360', 'PointCloud'] | None) – CAD, PointCloud or Image360

  • thumbnail (DirectRelationReference | tuple[str, str] | None) – Thumbnail of the 3D model

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.Cognite3DObject(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, x_min: Optional[float] = None, x_max: Optional[float] = None, y_min: Optional[float] = None, y_max: Optional[float] = None, z_min: Optional[float] = None, z_max: Optional[float] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _Cognite3DObjectProperties, TypedNode

This represents the reading format of Cognite 3D object.

It is used when data is read from CDF.

This is the virtual position representation of an object in the physical world, connecting an asset to one or more 3D resources

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite 3D object.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • x_min (float | None) – Lowest X value in bounding box

  • x_max (float | None) – Highest X value in bounding box

  • y_min (float | None) – Lowest Y value in bounding box

  • y_max (float | None) – Highest Y value in bounding box

  • z_min (float | None) – Lowest Z value in bounding box

  • z_max (float | None) – Highest Z value in bounding box

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.Cognite3DObjectApply(space: str, external_id: str, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, x_min: Optional[float] = None, x_max: Optional[float] = None, y_min: Optional[float] = None, y_max: Optional[float] = None, z_min: Optional[float] = None, z_max: Optional[float] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _Cognite3DObjectProperties, TypedNodeApply

This represents the writing format of Cognite 3D object.

It is used when data is written to CDF.

This is the virtual position representation of an object in the physical world, connecting an asset to one or more 3D resources

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite 3D object.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • x_min (float | None) – Lowest X value in bounding box

  • x_max (float | None) – Highest X value in bounding box

  • y_min (float | None) – Lowest Y value in bounding box

  • y_max (float | None) – Highest Y value in bounding box

  • z_min (float | None) – Lowest Z value in bounding box

  • z_max (float | None) – Highest Z value in bounding box

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.Cognite3DRevision(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, status: Optional[Literal['Done', 'Failed', 'Processing', 'Queued']] = None, published: Optional[bool] = None, revision_type: Optional[Literal['CAD', 'Image360', 'PointCloud']] = None, model_3d: Optional[DirectRelationReference] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _Cognite3DRevisionProperties, TypedNode

This represents the reading format of Cognite 3D revision.

It is used when data is read from CDF.

Shared revision information for various 3D data types. Normally not used directly, but through CognitePointCloudRevision, Image360Collection or CogniteCADRevision

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite 3D revision.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • status (Literal['Done', 'Failed', 'Processing', 'Queued'] | None) – The status field.

  • published (bool | None) – The published field.

  • revision_type (Literal['CAD', 'Image360', 'PointCloud'] | None) – The revision type field.

  • model_3d (DirectRelationReference | None) – The model 3d field.

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.Cognite3DRevisionApply(space: str, external_id: str, *, status: Optional[Literal['Done', 'Failed', 'Processing', 'Queued']] = None, published: Optional[bool] = None, revision_type: Optional[Literal['CAD', 'Image360', 'PointCloud']] = None, model_3d: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _Cognite3DRevisionProperties, TypedNodeApply

This represents the writing format of Cognite 3D revision.

It is used when data is written to CDF.

Shared revision information for various 3D data types. Normally not used directly, but through CognitePointCloudRevision, Image360Collection or CogniteCADRevision

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite 3D revision.

  • status (Literal['Done', 'Failed', 'Processing', 'Queued'] | None) – The status field.

  • published (bool | None) – The published field.

  • revision_type (Literal['CAD', 'Image360', 'PointCloud'] | None) – The revision type field.

  • model_3d (DirectRelationReference | tuple[str, str] | None) – The model 3d field.

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.Cognite3DTransformationEdge(space: str, external_id: str, type: DirectRelationReference, start_node: DirectRelationReference, end_node: DirectRelationReference, version: int, last_updated_time: int, created_time: int, *, translation_x: Optional[float] = None, translation_y: Optional[float] = None, translation_z: Optional[float] = None, euler_rotation_x: Optional[float] = None, euler_rotation_y: Optional[float] = None, euler_rotation_z: Optional[float] = None, scale_x: Optional[float] = None, scale_y: Optional[float] = None, scale_z: Optional[float] = None, deleted_time: Optional[int] = None)

Bases: _Cognite3DTransformationProperties, TypedEdge

This represents the reading format of Cognite 3D transformation edge.

It is used when data is read from CDF.

The Cognite3DTransformation object defines a comprehensive 3D transformation, enabling precise adjustments to an object’s position, orientation, and size in the 3D coordinate system. It allows for the translation of objects along the three spatial axes, rotation around these axes using Euler angles, and scaling along each axis to modify the object’s dimensions. The object’s transformation is defined in “CDF space”, a coordinate system where the positive Z axis is the up direction

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite 3D transformation edge.

  • type (DirectRelationReference) – The type of edge.

  • start_node (DirectRelationReference) – Reference to the direct relation. The reference consists of a space and an external-id.

  • end_node (DirectRelationReference) – Reference to the direct relation. The reference consists of a space and an external-id.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • translation_x (float | None) – The displacement of the object along the X-axis in the 3D coordinate system

  • translation_y (float | None) – The displacement of the object along the Y-axis in the 3D coordinate system

  • translation_z (float | None) – The displacement of the object along the Z-axis in the 3D coordinate system

  • euler_rotation_x (float | None) – The rotation of the object around the X-axis in radians

  • euler_rotation_y (float | None) – The rotation of the object around the Y-axis in radians

  • euler_rotation_z (float | None) – The rotation of the object around the Z-axis in radians

  • scale_x (float | None) – The scaling factor applied to the object along the X-axis

  • scale_y (float | None) – The scaling factor applied to the object along the Y-axis

  • scale_z (float | None) – The scaling factor applied to the object along the Z-axis

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.Cognite3DTransformationEdgeApply(space: str, external_id: str, type: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], start_node: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], end_node: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], *, translation_x: Optional[float] = None, translation_y: Optional[float] = None, translation_z: Optional[float] = None, euler_rotation_x: Optional[float] = None, euler_rotation_y: Optional[float] = None, euler_rotation_z: Optional[float] = None, scale_x: Optional[float] = None, scale_y: Optional[float] = None, scale_z: Optional[float] = None, existing_version: Optional[int] = None)

Bases: _Cognite3DTransformationProperties, TypedEdgeApply

This represents the writing format of Cognite 3D transformation edge.

It is used when data is written to CDF.

The Cognite3DTransformation object defines a comprehensive 3D transformation, enabling precise adjustments to an object’s position, orientation, and size in the 3D coordinate system. It allows for the translation of objects along the three spatial axes, rotation around these axes using Euler angles, and scaling along each axis to modify the object’s dimensions. The object’s transformation is defined in “CDF space”, a coordinate system where the positive Z axis is the up direction

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite 3D transformation edge.

  • type (DirectRelationReference | tuple[str, str]) – The type of edge.

  • start_node (DirectRelationReference | tuple[str, str]) – Reference to the direct relation. The reference consists of a space and an external-id.

  • end_node (DirectRelationReference | tuple[str, str]) – Reference to the direct relation. The reference consists of a space and an external-id.

  • translation_x (float | None) – The displacement of the object along the X-axis in the 3D coordinate system

  • translation_y (float | None) – The displacement of the object along the Y-axis in the 3D coordinate system

  • translation_z (float | None) – The displacement of the object along the Z-axis in the 3D coordinate system

  • euler_rotation_x (float | None) – The rotation of the object around the X-axis in radians

  • euler_rotation_y (float | None) – The rotation of the object around the Y-axis in radians

  • euler_rotation_z (float | None) – The rotation of the object around the Z-axis in radians

  • scale_x (float | None) – The scaling factor applied to the object along the X-axis

  • scale_y (float | None) – The scaling factor applied to the object along the Y-axis

  • scale_z (float | None) – The scaling factor applied to the object along the Z-axis

  • existing_version (int | None) – Fail the ingestion request if the edge’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the edge (for the specified container or edge). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

class cognite.client.data_classes.data_modeling.cdm.v1.Cognite3DTransformationNode(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, translation_x: Optional[float] = None, translation_y: Optional[float] = None, translation_z: Optional[float] = None, euler_rotation_x: Optional[float] = None, euler_rotation_y: Optional[float] = None, euler_rotation_z: Optional[float] = None, scale_x: Optional[float] = None, scale_y: Optional[float] = None, scale_z: Optional[float] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _Cognite3DTransformationProperties, TypedNode

This represents the reading format of Cognite 3D transformation node.

It is used when data is read from CDF.

The Cognite3DTransformation object defines a comprehensive 3D transformation, enabling precise adjustments to an object’s position, orientation, and size in the 3D coordinate system. It allows for the translation of objects along the three spatial axes, rotation around these axes using Euler angles, and scaling along each axis to modify the object’s dimensions. The object’s transformation is defined in “CDF space”, a coordinate system where the positive Z axis is the up direction

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite 3D transformation node.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • translation_x (float | None) – The displacement of the object along the X-axis in the 3D coordinate system

  • translation_y (float | None) – The displacement of the object along the Y-axis in the 3D coordinate system

  • translation_z (float | None) – The displacement of the object along the Z-axis in the 3D coordinate system

  • euler_rotation_x (float | None) – The rotation of the object around the X-axis in radians

  • euler_rotation_y (float | None) – The rotation of the object around the Y-axis in radians

  • euler_rotation_z (float | None) – The rotation of the object around the Z-axis in radians

  • scale_x (float | None) – The scaling factor applied to the object along the X-axis

  • scale_y (float | None) – The scaling factor applied to the object along the Y-axis

  • scale_z (float | None) – The scaling factor applied to the object along the Z-axis

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.Cognite3DTransformationNodeApply(space: str, external_id: str, *, translation_x: Optional[float] = None, translation_y: Optional[float] = None, translation_z: Optional[float] = None, euler_rotation_x: Optional[float] = None, euler_rotation_y: Optional[float] = None, euler_rotation_z: Optional[float] = None, scale_x: Optional[float] = None, scale_y: Optional[float] = None, scale_z: Optional[float] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _Cognite3DTransformationProperties, TypedNodeApply

This represents the writing format of Cognite 3D transformation node.

It is used when data is written to CDF.

The Cognite3DTransformation object defines a comprehensive 3D transformation, enabling precise adjustments to an object’s position, orientation, and size in the 3D coordinate system. It allows for the translation of objects along the three spatial axes, rotation around these axes using Euler angles, and scaling along each axis to modify the object’s dimensions. The object’s transformation is defined in “CDF space”, a coordinate system where the positive Z axis is the up direction

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite 3D transformation node.

  • translation_x (float | None) – The displacement of the object along the X-axis in the 3D coordinate system

  • translation_y (float | None) – The displacement of the object along the Y-axis in the 3D coordinate system

  • translation_z (float | None) – The displacement of the object along the Z-axis in the 3D coordinate system

  • euler_rotation_x (float | None) – The rotation of the object around the X-axis in radians

  • euler_rotation_y (float | None) – The rotation of the object around the Y-axis in radians

  • euler_rotation_z (float | None) – The rotation of the object around the Z-axis in radians

  • scale_x (float | None) – The scaling factor applied to the object along the X-axis

  • scale_y (float | None) – The scaling factor applied to the object along the Y-axis

  • scale_z (float | None) – The scaling factor applied to the object along the Z-axis

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteActivity(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, source_id: Optional[str] = None, source_context: Optional[str] = None, source: Optional[DirectRelationReference] = None, source_created_time: Optional[datetime] = None, source_updated_time: Optional[datetime] = None, source_created_user: Optional[str] = None, source_updated_user: Optional[str] = None, start_time: Optional[datetime] = None, end_time: Optional[datetime] = None, scheduled_start_time: Optional[datetime] = None, scheduled_end_time: Optional[datetime] = None, assets: Optional[list[cognite.client.data_classes.data_modeling.data_types.DirectRelationReference]] = None, equipment: Optional[list[cognite.client.data_classes.data_modeling.data_types.DirectRelationReference]] = None, time_series: Optional[list[cognite.client.data_classes.data_modeling.data_types.DirectRelationReference]] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _CogniteActivityProperties, TypedNode

This represents the reading format of Cognite activity.

It is used when data is read from CDF.

Represents activities. Activities typically happen over a period and have a start and end time.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite activity.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • source_id (str | None) – Identifier from the source system

  • source_context (str | None) – Context of the source id. For systems where the sourceId is globally unique, the sourceContext is expected to not be set.

  • source (DirectRelationReference | None) – Direct relation to a source system

  • source_created_time (datetime | None) – When the instance was created in source system (if available)

  • source_updated_time (datetime | None) – When the instance was last updated in the source system (if available)

  • source_created_user (str | None) – User identifier from the source system on who created the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_updated_user (str | None) – User identifier from the source system on who last updated the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • start_time (datetime | None) – The actual start time of an activity (or similar that extends this)

  • end_time (datetime | None) – The actual end time of an activity (or similar that extends this)

  • scheduled_start_time (datetime | None) – The planned start time of an activity (or similar that extends this)

  • scheduled_end_time (datetime | None) – The planned end time of an activity (or similar that extends this)

  • assets (list[DirectRelationReference] | None) – A list of assets the activity is related to.

  • equipment (list[DirectRelationReference] | None) – A list of equipment the activity is related to.

  • time_series (list[DirectRelationReference] | None) – A list of time series the activity is related to.

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteActivityApply(space: str, external_id: str, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, source_id: Optional[str] = None, source_context: Optional[str] = None, source: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, source_created_time: Optional[datetime] = None, source_updated_time: Optional[datetime] = None, source_created_user: Optional[str] = None, source_updated_user: Optional[str] = None, start_time: Optional[datetime] = None, end_time: Optional[datetime] = None, scheduled_start_time: Optional[datetime] = None, scheduled_end_time: Optional[datetime] = None, assets: Optional[list[cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str]]] = None, equipment: Optional[list[cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str]]] = None, time_series: Optional[list[cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str]]] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _CogniteActivityProperties, TypedNodeApply

This represents the writing format of Cognite activity.

It is used when data is written to CDF.

Represents activities. Activities typically happen over a period and have a start and end time.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite activity.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • source_id (str | None) – Identifier from the source system

  • source_context (str | None) – Context of the source id. For systems where the sourceId is globally unique, the sourceContext is expected to not be set.

  • source (DirectRelationReference | tuple[str, str] | None) – Direct relation to a source system

  • source_created_time (datetime | None) – When the instance was created in source system (if available)

  • source_updated_time (datetime | None) – When the instance was last updated in the source system (if available)

  • source_created_user (str | None) – User identifier from the source system on who created the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_updated_user (str | None) – User identifier from the source system on who last updated the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • start_time (datetime | None) – The actual start time of an activity (or similar that extends this)

  • end_time (datetime | None) – The actual end time of an activity (or similar that extends this)

  • scheduled_start_time (datetime | None) – The planned start time of an activity (or similar that extends this)

  • scheduled_end_time (datetime | None) – The planned end time of an activity (or similar that extends this)

  • assets (list[DirectRelationReference | tuple[str, str]] | None) – A list of assets the activity is related to.

  • equipment (list[DirectRelationReference | tuple[str, str]] | None) – A list of equipment the activity is related to.

  • time_series (list[DirectRelationReference | tuple[str, str]] | None) – A list of time series the activity is related to.

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteAnnotation(space: str, external_id: str, type: DirectRelationReference, start_node: DirectRelationReference, end_node: DirectRelationReference, version: int, last_updated_time: int, created_time: int, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, source_id: Optional[str] = None, source_context: Optional[str] = None, source: Optional[DirectRelationReference] = None, source_created_time: Optional[datetime] = None, source_updated_time: Optional[datetime] = None, source_created_user: Optional[str] = None, source_updated_user: Optional[str] = None, confidence: Optional[float] = None, status: Optional[Literal['Approved', 'Rejected', 'Suggested']] = None, deleted_time: Optional[int] = None)

Bases: _CogniteAnnotationProperties, TypedEdge

This represents the reading format of Cognite annotation.

It is used when data is read from CDF.

Annotation represents contextualization results or links

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite annotation.

  • type (DirectRelationReference) – The type of edge.

  • start_node (DirectRelationReference) – Reference to the direct relation. The reference consists of a space and an external-id.

  • end_node (DirectRelationReference) – Reference to the direct relation. The reference consists of a space and an external-id.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • source_id (str | None) – Identifier from the source system

  • source_context (str | None) – Context of the source id. For systems where the sourceId is globally unique, the sourceContext is expected to not be set.

  • source (DirectRelationReference | None) – Direct relation to a source system

  • source_created_time (datetime | None) – When the instance was created in source system (if available)

  • source_updated_time (datetime | None) – When the instance was last updated in the source system (if available)

  • source_created_user (str | None) – User identifier from the source system on who created the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_updated_user (str | None) – User identifier from the source system on who last updated the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • confidence (float | None) – The confidence that the annotation is a good match

  • status (Literal['Approved', 'Rejected', 'Suggested'] | None) – The status of the annotation

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteAnnotationApply(space: str, external_id: str, type: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], start_node: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], end_node: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, source_id: Optional[str] = None, source_context: Optional[str] = None, source: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, source_created_time: Optional[datetime] = None, source_updated_time: Optional[datetime] = None, source_created_user: Optional[str] = None, source_updated_user: Optional[str] = None, confidence: Optional[float] = None, status: Optional[Literal['Approved', 'Rejected', 'Suggested']] = None, existing_version: Optional[int] = None)

Bases: _CogniteAnnotationProperties, TypedEdgeApply

This represents the writing format of Cognite annotation.

It is used when data is written to CDF.

Annotation represents contextualization results or links

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite annotation.

  • type (DirectRelationReference | tuple[str, str]) – The type of edge.

  • start_node (DirectRelationReference | tuple[str, str]) – Reference to the direct relation. The reference consists of a space and an external-id.

  • end_node (DirectRelationReference | tuple[str, str]) – Reference to the direct relation. The reference consists of a space and an external-id.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • source_id (str | None) – Identifier from the source system

  • source_context (str | None) – Context of the source id. For systems where the sourceId is globally unique, the sourceContext is expected to not be set.

  • source (DirectRelationReference | tuple[str, str] | None) – Direct relation to a source system

  • source_created_time (datetime | None) – When the instance was created in source system (if available)

  • source_updated_time (datetime | None) – When the instance was last updated in the source system (if available)

  • source_created_user (str | None) – User identifier from the source system on who created the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_updated_user (str | None) – User identifier from the source system on who last updated the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • confidence (float | None) – The confidence that the annotation is a good match

  • status (Literal['Approved', 'Rejected', 'Suggested'] | None) – The status of the annotation

  • existing_version (int | None) – Fail the ingestion request if the edge’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the edge (for the specified container or edge). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteAsset(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, object_3d: Optional[DirectRelationReference] = None, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, source_id: Optional[str] = None, source_context: Optional[str] = None, source: Optional[DirectRelationReference] = None, source_created_time: Optional[datetime] = None, source_updated_time: Optional[datetime] = None, source_created_user: Optional[str] = None, source_updated_user: Optional[str] = None, parent: Optional[DirectRelationReference] = None, root: Optional[DirectRelationReference] = None, path: Optional[list[cognite.client.data_classes.data_modeling.data_types.DirectRelationReference]] = None, path_last_updated_time: Optional[datetime] = None, asset_class: Optional[DirectRelationReference] = None, asset_type: Optional[DirectRelationReference] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _CogniteAssetProperties, TypedNode

This represents the reading format of Cognite asset.

It is used when data is read from CDF.

Assets represent systems that support industrial functions or processes. Assets are often called ‘functional location’.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite asset.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • object_3d (DirectRelationReference | None) – Direct relation to an Object3D instance representing the 3D resource

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • source_id (str | None) – Identifier from the source system

  • source_context (str | None) – Context of the source id. For systems where the sourceId is globally unique, the sourceContext is expected to not be set.

  • source (DirectRelationReference | None) – Direct relation to a source system

  • source_created_time (datetime | None) – When the instance was created in source system (if available)

  • source_updated_time (datetime | None) – When the instance was last updated in the source system (if available)

  • source_created_user (str | None) – User identifier from the source system on who created the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_updated_user (str | None) – User identifier from the source system on who last updated the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • parent (DirectRelationReference | None) – The parent of the asset.

  • root (DirectRelationReference | None) – An automatically updated reference to the top-level asset of the hierarchy.

  • path (list[DirectRelationReference] | None) – An automatically updated ordered list of this asset’s ancestors, starting with the root asset. Enables subtree filtering to find all assets under a parent.

  • path_last_updated_time (datetime | None) – The last time the path was updated for this asset.

  • asset_class (DirectRelationReference | None) – Specifies the class of the asset. It’s a direct relation to CogniteAssetClass.

  • asset_type (DirectRelationReference | None) – Specifies the type of the asset. It’s a direct relation to CogniteAssetType.

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteAssetApply(space: str, external_id: str, *, object_3d: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, source_id: Optional[str] = None, source_context: Optional[str] = None, source: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, source_created_time: Optional[datetime] = None, source_updated_time: Optional[datetime] = None, source_created_user: Optional[str] = None, source_updated_user: Optional[str] = None, parent: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, asset_class: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, asset_type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _CogniteAssetProperties, TypedNodeApply

This represents the writing format of Cognite asset.

It is used when data is written to CDF.

Assets represent systems that support industrial functions or processes. Assets are often called ‘functional location’.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite asset.

  • object_3d (DirectRelationReference | tuple[str, str] | None) – Direct relation to an Object3D instance representing the 3D resource

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • source_id (str | None) – Identifier from the source system

  • source_context (str | None) – Context of the source id. For systems where the sourceId is globally unique, the sourceContext is expected to not be set.

  • source (DirectRelationReference | tuple[str, str] | None) – Direct relation to a source system

  • source_created_time (datetime | None) – When the instance was created in source system (if available)

  • source_updated_time (datetime | None) – When the instance was last updated in the source system (if available)

  • source_created_user (str | None) – User identifier from the source system on who created the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_updated_user (str | None) – User identifier from the source system on who last updated the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • parent (DirectRelationReference | tuple[str, str] | None) – The parent of the asset.

  • asset_class (DirectRelationReference | tuple[str, str] | None) – Specifies the class of the asset. It’s a direct relation to CogniteAssetClass.

  • asset_type (DirectRelationReference | tuple[str, str] | None) – Specifies the type of the asset. It’s a direct relation to CogniteAssetType.

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteAssetClass(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, code: Optional[str] = None, standard: Optional[str] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _CogniteAssetClassProperties, TypedNode

This represents the reading format of Cognite asset clas.

It is used when data is read from CDF.

Represents the class of an asset.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite asset clas.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • code (str | None) – A unique identifier for the class of asset.

  • standard (str | None) – A text string to specify which standard the class is from.

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteAssetClassApply(space: str, external_id: str, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, code: Optional[str] = None, standard: Optional[str] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _CogniteAssetClassProperties, TypedNodeApply

This represents the writing format of Cognite asset clas.

It is used when data is written to CDF.

Represents the class of an asset.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite asset clas.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • code (str | None) – A unique identifier for the class of asset.

  • standard (str | None) – A text string to specify which standard the class is from.

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteAssetType(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, code: Optional[str] = None, standard: Optional[str] = None, asset_class: Optional[DirectRelationReference] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _CogniteAssetTypeProperties, TypedNode

This represents the reading format of Cognite asset type.

It is used when data is read from CDF.

Represents the type of an asset.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite asset type.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • code (str | None) – A unique identifier for the type of asset.

  • standard (str | None) – A text string to specify which standard the type is from.

  • asset_class (DirectRelationReference | None) – Specifies the class the type belongs to. It’s a direct relation to CogniteAssetClass.

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteAssetTypeApply(space: str, external_id: str, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, code: Optional[str] = None, standard: Optional[str] = None, asset_class: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _CogniteAssetTypeProperties, TypedNodeApply

This represents the writing format of Cognite asset type.

It is used when data is written to CDF.

Represents the type of an asset.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite asset type.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • code (str | None) – A unique identifier for the type of asset.

  • standard (str | None) – A text string to specify which standard the type is from.

  • asset_class (DirectRelationReference | tuple[str, str] | None) – Specifies the class the type belongs to. It’s a direct relation to CogniteAssetClass.

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteCADModel(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, model_type: Optional[Literal['CAD', 'Image360', 'PointCloud']] = None, thumbnail: Optional[DirectRelationReference] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _CogniteCADModelProperties, TypedNode

This represents the reading format of Cognite cad model.

It is used when data is read from CDF.

Navigational aid for traversing CogniteCADModel instances

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite cad model.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • model_type (Literal['CAD', 'Image360', 'PointCloud'] | None) – CAD, PointCloud or Image360

  • thumbnail (DirectRelationReference | None) – Thumbnail of the 3D model

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteCADModelApply(space: str, external_id: str, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, model_type: Optional[Literal['CAD', 'Image360', 'PointCloud']] = None, thumbnail: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _CogniteCADModelProperties, TypedNodeApply

This represents the writing format of Cognite cad model.

It is used when data is written to CDF.

Navigational aid for traversing CogniteCADModel instances

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite cad model.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • model_type (Literal['CAD', 'Image360', 'PointCloud'] | None) – CAD, PointCloud or Image360

  • thumbnail (DirectRelationReference | tuple[str, str] | None) – Thumbnail of the 3D model

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteCADNode(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, object_3d: Optional[DirectRelationReference] = None, model_3d: Optional[DirectRelationReference] = None, cad_node_reference: Optional[str] = None, revisions: Optional[list[cognite.client.data_classes.data_modeling.data_types.DirectRelationReference]] = None, tree_indexes: Optional[list[int]] = None, sub_tree_sizes: Optional[list[int]] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _CogniteCADNodeProperties, TypedNode

This represents the reading format of Cognite cad node.

It is used when data is read from CDF.

Represents nodes from the 3D model that have been contextualized

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite cad node.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • object_3d (DirectRelationReference | None) – Direct relation to object3D grouping for this node

  • model_3d (DirectRelationReference | None) – Direct relation to Cognite3DModel

  • cad_node_reference (str | None) – Reference to a node within a CAD model from the 3D API

  • revisions (list[DirectRelationReference] | None) – List of direct relations to instances of Cognite3DRevision which this CogniteCADNode exists in.

  • tree_indexes (list[int] | None) – List of tree indexes in the same order as revisions. Used by Reveal and similar applications to map from CogniteCADNode to tree index

  • sub_tree_sizes (list[int] | None) – List of subtree sizes in the same order as revisions. Used by Reveal and similar applications to know how many nodes exists below this node in the hierarchy

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteCADNodeApply(space: str, external_id: str, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, object_3d: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, model_3d: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, cad_node_reference: Optional[str] = None, revisions: Optional[list[cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str]]] = None, tree_indexes: Optional[list[int]] = None, sub_tree_sizes: Optional[list[int]] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _CogniteCADNodeProperties, TypedNodeApply

This represents the writing format of Cognite cad node.

It is used when data is written to CDF.

Represents nodes from the 3D model that have been contextualized

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite cad node.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • object_3d (DirectRelationReference | tuple[str, str] | None) – Direct relation to object3D grouping for this node

  • model_3d (DirectRelationReference | tuple[str, str] | None) – Direct relation to Cognite3DModel

  • cad_node_reference (str | None) – Reference to a node within a CAD model from the 3D API

  • revisions (list[DirectRelationReference | tuple[str, str]] | None) – List of direct relations to instances of Cognite3DRevision which this CogniteCADNode exists in.

  • tree_indexes (list[int] | None) – List of tree indexes in the same order as revisions. Used by Reveal and similar applications to map from CogniteCADNode to tree index

  • sub_tree_sizes (list[int] | None) – List of subtree sizes in the same order as revisions. Used by Reveal and similar applications to know how many nodes exists below this node in the hierarchy

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteCADRevision(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, status: Optional[Literal['Done', 'Failed', 'Processing', 'Queued']] = None, published: Optional[bool] = None, revision_type: Optional[Literal['CAD', 'Image360', 'PointCloud']] = None, model_3d: Optional[DirectRelationReference] = None, revision_id: Optional[int] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _CogniteCADRevisionProperties, TypedNode

This represents the reading format of Cognite cad revision.

It is used when data is read from CDF.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite cad revision.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • status (Literal['Done', 'Failed', 'Processing', 'Queued'] | None) – The status field.

  • published (bool | None) – The published field.

  • revision_type (Literal['CAD', 'Image360', 'PointCloud'] | None) – The revision type field.

  • model_3d (DirectRelationReference | None) –

    .

  • revision_id (int | None) – The 3D API revision identifier for this CAD model

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteCADRevisionApply(space: str, external_id: str, *, status: Optional[Literal['Done', 'Failed', 'Processing', 'Queued']] = None, published: Optional[bool] = None, revision_type: Optional[Literal['CAD', 'Image360', 'PointCloud']] = None, model_3d: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, revision_id: Optional[int] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _CogniteCADRevisionProperties, TypedNodeApply

This represents the writing format of Cognite cad revision.

It is used when data is written to CDF.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite cad revision.

  • status (Literal['Done', 'Failed', 'Processing', 'Queued'] | None) – The status field.

  • published (bool | None) – The published field.

  • revision_type (Literal['CAD', 'Image360', 'PointCloud'] | None) – The revision type field.

  • model_3d (DirectRelationReference | tuple[str, str] | None) –

    .

  • revision_id (int | None) – The 3D API revision identifier for this CAD model

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteCubeMap(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, front: Optional[DirectRelationReference] = None, back: Optional[DirectRelationReference] = None, left: Optional[DirectRelationReference] = None, right: Optional[DirectRelationReference] = None, top: Optional[DirectRelationReference] = None, bottom: Optional[DirectRelationReference] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _CogniteCubeMapProperties, TypedNode

This represents the reading format of Cognite cube map.

It is used when data is read from CDF.

The cube map holds references to 6 images in used to visually represent the surrounding environment

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite cube map.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • front (DirectRelationReference | None) – Direct relation to a file holding the front projection of the cube map

  • back (DirectRelationReference | None) – Direct relation to a file holding the back projection of the cube map

  • left (DirectRelationReference | None) – Direct relation to a file holding the left projection of the cube map

  • right (DirectRelationReference | None) – Direct relation to a file holding the right projection of the cube map

  • top (DirectRelationReference | None) – Direct relation to a file holding the top projection of the cube map

  • bottom (DirectRelationReference | None) – Direct relation to a file holding the bottom projection of the cube map

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteCubeMapApply(space: str, external_id: str, *, front: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, back: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, left: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, right: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, top: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, bottom: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _CogniteCubeMapProperties, TypedNodeApply

This represents the writing format of Cognite cube map.

It is used when data is written to CDF.

The cube map holds references to 6 images in used to visually represent the surrounding environment

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite cube map.

  • front (DirectRelationReference | tuple[str, str] | None) – Direct relation to a file holding the front projection of the cube map

  • back (DirectRelationReference | tuple[str, str] | None) – Direct relation to a file holding the back projection of the cube map

  • left (DirectRelationReference | tuple[str, str] | None) – Direct relation to a file holding the left projection of the cube map

  • right (DirectRelationReference | tuple[str, str] | None) – Direct relation to a file holding the right projection of the cube map

  • top (DirectRelationReference | tuple[str, str] | None) – Direct relation to a file holding the top projection of the cube map

  • bottom (DirectRelationReference | tuple[str, str] | None) – Direct relation to a file holding the bottom projection of the cube map

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteDescribableEdge(space: str, external_id: str, type: DirectRelationReference, start_node: DirectRelationReference, end_node: DirectRelationReference, version: int, last_updated_time: int, created_time: int, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, deleted_time: Optional[int] = None)

Bases: _CogniteDescribableProperties, TypedEdge

This represents the reading format of Cognite describable edge.

It is used when data is read from CDF.

The describable core concept is used as a standard way of holding the bare minimum of information about the instance

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite describable edge.

  • type (DirectRelationReference) – The type of edge.

  • start_node (DirectRelationReference) – Reference to the direct relation. The reference consists of a space and an external-id.

  • end_node (DirectRelationReference) – Reference to the direct relation. The reference consists of a space and an external-id.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteDescribableEdgeApply(space: str, external_id: str, type: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], start_node: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], end_node: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, existing_version: Optional[int] = None)

Bases: _CogniteDescribableProperties, TypedEdgeApply

This represents the writing format of Cognite describable edge.

It is used when data is written to CDF.

The describable core concept is used as a standard way of holding the bare minimum of information about the instance

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite describable edge.

  • type (DirectRelationReference | tuple[str, str]) – The type of edge.

  • start_node (DirectRelationReference | tuple[str, str]) – Reference to the direct relation. The reference consists of a space and an external-id.

  • end_node (DirectRelationReference | tuple[str, str]) – Reference to the direct relation. The reference consists of a space and an external-id.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • existing_version (int | None) – Fail the ingestion request if the edge’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the edge (for the specified container or edge). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteDescribableNode(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _CogniteDescribableProperties, TypedNode

This represents the reading format of Cognite describable node.

It is used when data is read from CDF.

The describable core concept is used as a standard way of holding the bare minimum of information about the instance

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite describable node.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteDescribableNodeApply(space: str, external_id: str, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _CogniteDescribableProperties, TypedNodeApply

This represents the writing format of Cognite describable node.

It is used when data is written to CDF.

The describable core concept is used as a standard way of holding the bare minimum of information about the instance

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite describable node.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteDiagramAnnotation(space: str, external_id: str, type: DirectRelationReference, start_node: DirectRelationReference, end_node: DirectRelationReference, version: int, last_updated_time: int, created_time: int, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, source_id: Optional[str] = None, source_context: Optional[str] = None, source: Optional[DirectRelationReference] = None, source_created_time: Optional[datetime] = None, source_updated_time: Optional[datetime] = None, source_created_user: Optional[str] = None, source_updated_user: Optional[str] = None, confidence: Optional[float] = None, status: Optional[Literal['Approved', 'Rejected', 'Suggested']] = None, start_node_page_number: Optional[int] = None, end_node_page_number: Optional[int] = None, start_node_x_min: Optional[float] = None, start_node_x_max: Optional[float] = None, start_node_y_min: Optional[float] = None, start_node_y_max: Optional[float] = None, start_node_text: Optional[str] = None, end_node_x_min: Optional[float] = None, end_node_x_max: Optional[float] = None, end_node_y_min: Optional[float] = None, end_node_y_max: Optional[float] = None, end_node_text: Optional[str] = None, deleted_time: Optional[int] = None)

Bases: _CogniteDiagramAnnotationProperties, TypedEdge

This represents the reading format of Cognite diagram annotation.

It is used when data is read from CDF.

Annotation for diagrams

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite diagram annotation.

  • type (DirectRelationReference) – The type of edge.

  • start_node (DirectRelationReference) – Reference to the direct relation. The reference consists of a space and an external-id.

  • end_node (DirectRelationReference) – Reference to the direct relation. The reference consists of a space and an external-id.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • source_id (str | None) – Identifier from the source system

  • source_context (str | None) – Context of the source id. For systems where the sourceId is globally unique, the sourceContext is expected to not be set.

  • source (DirectRelationReference | None) – Direct relation to a source system

  • source_created_time (datetime | None) – When the instance was created in source system (if available)

  • source_updated_time (datetime | None) – When the instance was last updated in the source system (if available)

  • source_created_user (str | None) – User identifier from the source system on who created the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_updated_user (str | None) – User identifier from the source system on who last updated the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • confidence (float | None) – The confidence that the annotation is a good match

  • status (Literal['Approved', 'Rejected', 'Suggested'] | None) – The status of the annotation

  • start_node_page_number (int | None) – The number of the page on which this annotation is located in startNode File. The first page has number 1

  • end_node_page_number (int | None) – The number of the page on which this annotation is located in the endNode File if an endNode is present. The first page has number 1

  • start_node_x_min (float | None) – Value between [0,1]. Minimum abscissa of the bounding box (left edge). Must be strictly less than startNodeXMax

  • start_node_x_max (float | None) – Value between [0,1]. Maximum abscissa of the bounding box (right edge). Must be strictly more than startNodeXMin

  • start_node_y_min (float | None) – Value between [0,1]. Minimum ordinate of the bounding box (bottom edge). Must be strictly less than startNodeYMax

  • start_node_y_max (float | None) – Value between [0,1]. Maximum ordinate of the bounding box (top edge). Must be strictly more than startNodeYMin

  • start_node_text (str | None) – The text extracted from within the bounding box on the startNode

  • end_node_x_min (float | None) – Value between [0,1]. Minimum abscissa of the bounding box (left edge). Must be strictly less than endNodeXMax. Only applicable if an endNode is defined

  • end_node_x_max (float | None) – Value between [0,1]. Maximum abscissa of the bounding box (right edge). Must be strictly more than endNodeXMin. Only applicable if an endNode is defined

  • end_node_y_min (float | None) – Value between [0,1]. Minimum ordinate of the bounding box (bottom edge). Must be strictly less than endNodeYMax. Only applicable if an endNode is defined

  • end_node_y_max (float | None) – Value between [0,1]. Maximum ordinate of the bounding box (top edge). Must be strictly more than endNodeYMin. Only applicable if an endNode is defined

  • end_node_text (str | None) – The text extracted from within the bounding box on the endNode. Only applicable if an endNode is defined

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteDiagramAnnotationApply(space: str, external_id: str, type: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], start_node: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], end_node: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, source_id: Optional[str] = None, source_context: Optional[str] = None, source: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, source_created_time: Optional[datetime] = None, source_updated_time: Optional[datetime] = None, source_created_user: Optional[str] = None, source_updated_user: Optional[str] = None, confidence: Optional[float] = None, status: Optional[Literal['Approved', 'Rejected', 'Suggested']] = None, start_node_page_number: Optional[int] = None, end_node_page_number: Optional[int] = None, start_node_x_min: Optional[float] = None, start_node_x_max: Optional[float] = None, start_node_y_min: Optional[float] = None, start_node_y_max: Optional[float] = None, start_node_text: Optional[str] = None, end_node_x_min: Optional[float] = None, end_node_x_max: Optional[float] = None, end_node_y_min: Optional[float] = None, end_node_y_max: Optional[float] = None, end_node_text: Optional[str] = None, existing_version: Optional[int] = None)

Bases: _CogniteDiagramAnnotationProperties, TypedEdgeApply

This represents the writing format of Cognite diagram annotation.

It is used when data is written to CDF.

Annotation for diagrams

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite diagram annotation.

  • type (DirectRelationReference | tuple[str, str]) – The type of edge.

  • start_node (DirectRelationReference | tuple[str, str]) – Reference to the direct relation. The reference consists of a space and an external-id.

  • end_node (DirectRelationReference | tuple[str, str]) – Reference to the direct relation. The reference consists of a space and an external-id.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • source_id (str | None) – Identifier from the source system

  • source_context (str | None) – Context of the source id. For systems where the sourceId is globally unique, the sourceContext is expected to not be set.

  • source (DirectRelationReference | tuple[str, str] | None) – Direct relation to a source system

  • source_created_time (datetime | None) – When the instance was created in source system (if available)

  • source_updated_time (datetime | None) – When the instance was last updated in the source system (if available)

  • source_created_user (str | None) – User identifier from the source system on who created the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_updated_user (str | None) – User identifier from the source system on who last updated the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • confidence (float | None) – The confidence that the annotation is a good match

  • status (Literal['Approved', 'Rejected', 'Suggested'] | None) – The status of the annotation

  • start_node_page_number (int | None) – The number of the page on which this annotation is located in startNode File. The first page has number 1

  • end_node_page_number (int | None) – The number of the page on which this annotation is located in the endNode File if an endNode is present. The first page has number 1

  • start_node_x_min (float | None) – Value between [0,1]. Minimum abscissa of the bounding box (left edge). Must be strictly less than startNodeXMax

  • start_node_x_max (float | None) – Value between [0,1]. Maximum abscissa of the bounding box (right edge). Must be strictly more than startNodeXMin

  • start_node_y_min (float | None) – Value between [0,1]. Minimum ordinate of the bounding box (bottom edge). Must be strictly less than startNodeYMax

  • start_node_y_max (float | None) – Value between [0,1]. Maximum ordinate of the bounding box (top edge). Must be strictly more than startNodeYMin

  • start_node_text (str | None) – The text extracted from within the bounding box on the startNode

  • end_node_x_min (float | None) – Value between [0,1]. Minimum abscissa of the bounding box (left edge). Must be strictly less than endNodeXMax. Only applicable if an endNode is defined

  • end_node_x_max (float | None) – Value between [0,1]. Maximum abscissa of the bounding box (right edge). Must be strictly more than endNodeXMin. Only applicable if an endNode is defined

  • end_node_y_min (float | None) – Value between [0,1]. Minimum ordinate of the bounding box (bottom edge). Must be strictly less than endNodeYMax. Only applicable if an endNode is defined

  • end_node_y_max (float | None) – Value between [0,1]. Maximum ordinate of the bounding box (top edge). Must be strictly more than endNodeYMin. Only applicable if an endNode is defined

  • end_node_text (str | None) – The text extracted from within the bounding box on the endNode. Only applicable if an endNode is defined

  • existing_version (int | None) – Fail the ingestion request if the edge’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the edge (for the specified container or edge). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteEquipment(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, source_id: Optional[str] = None, source_context: Optional[str] = None, source: Optional[DirectRelationReference] = None, source_created_time: Optional[datetime] = None, source_updated_time: Optional[datetime] = None, source_created_user: Optional[str] = None, source_updated_user: Optional[str] = None, asset: Optional[DirectRelationReference] = None, serial_number: Optional[str] = None, manufacturer: Optional[str] = None, equipment_type: Optional[DirectRelationReference] = None, files: Optional[list[cognite.client.data_classes.data_modeling.data_types.DirectRelationReference]] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _CogniteEquipmentProperties, TypedNode

This represents the reading format of Cognite equipment.

It is used when data is read from CDF.

Equipment represents physical supplies or devices.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite equipment.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • source_id (str | None) – Identifier from the source system

  • source_context (str | None) – Context of the source id. For systems where the sourceId is globally unique, the sourceContext is expected to not be set.

  • source (DirectRelationReference | None) – Direct relation to a source system

  • source_created_time (datetime | None) – When the instance was created in source system (if available)

  • source_updated_time (datetime | None) – When the instance was last updated in the source system (if available)

  • source_created_user (str | None) – User identifier from the source system on who created the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_updated_user (str | None) – User identifier from the source system on who last updated the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • asset (DirectRelationReference | None) – The asset the equipment is related to.

  • serial_number (str | None) – The serial number of the equipment.

  • manufacturer (str | None) – The manufacturer of the equipment.

  • equipment_type (DirectRelationReference | None) – Specifies the type of the equipment. It’s a direct relation to CogniteEquipmentType.

  • files (list[DirectRelationReference] | None) – A list of files the equipment relates to.

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteEquipmentApply(space: str, external_id: str, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, source_id: Optional[str] = None, source_context: Optional[str] = None, source: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, source_created_time: Optional[datetime] = None, source_updated_time: Optional[datetime] = None, source_created_user: Optional[str] = None, source_updated_user: Optional[str] = None, asset: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, serial_number: Optional[str] = None, manufacturer: Optional[str] = None, equipment_type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, files: Optional[list[cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str]]] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _CogniteEquipmentProperties, TypedNodeApply

This represents the writing format of Cognite equipment.

It is used when data is written to CDF.

Equipment represents physical supplies or devices.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite equipment.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • source_id (str | None) – Identifier from the source system

  • source_context (str | None) – Context of the source id. For systems where the sourceId is globally unique, the sourceContext is expected to not be set.

  • source (DirectRelationReference | tuple[str, str] | None) – Direct relation to a source system

  • source_created_time (datetime | None) – When the instance was created in source system (if available)

  • source_updated_time (datetime | None) – When the instance was last updated in the source system (if available)

  • source_created_user (str | None) – User identifier from the source system on who created the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_updated_user (str | None) – User identifier from the source system on who last updated the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • asset (DirectRelationReference | tuple[str, str] | None) – The asset the equipment is related to.

  • serial_number (str | None) – The serial number of the equipment.

  • manufacturer (str | None) – The manufacturer of the equipment.

  • equipment_type (DirectRelationReference | tuple[str, str] | None) – Specifies the type of the equipment. It’s a direct relation to CogniteEquipmentType.

  • files (list[DirectRelationReference | tuple[str, str]] | None) – A list of files the equipment relates to.

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteEquipmentType(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, code: Optional[str] = None, equipment_class: Optional[str] = None, standard: Optional[str] = None, standard_reference: Optional[str] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _CogniteEquipmentTypeProperties, TypedNode

This represents the reading format of Cognite equipment type.

It is used when data is read from CDF.

Represents the type of equipment.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite equipment type.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • code (str | None) – A unique identifier for the type of equipment.

  • equipment_class (str | None) – Represents the class of equipment.

  • standard (str | None) – An identifier for the standard this equipment type is sourced from, for example, ISO14224.

  • standard_reference (str | None) – A reference to the source of the equipment standard.

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteEquipmentTypeApply(space: str, external_id: str, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, code: Optional[str] = None, equipment_class: Optional[str] = None, standard: Optional[str] = None, standard_reference: Optional[str] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _CogniteEquipmentTypeProperties, TypedNodeApply

This represents the writing format of Cognite equipment type.

It is used when data is written to CDF.

Represents the type of equipment.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite equipment type.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • code (str | None) – A unique identifier for the type of equipment.

  • equipment_class (str | None) – Represents the class of equipment.

  • standard (str | None) – An identifier for the standard this equipment type is sourced from, for example, ISO14224.

  • standard_reference (str | None) – A reference to the source of the equipment standard.

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteFile(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, source_id: Optional[str] = None, source_context: Optional[str] = None, source: Optional[DirectRelationReference] = None, source_created_time: Optional[datetime] = None, source_updated_time: Optional[datetime] = None, source_created_user: Optional[str] = None, source_updated_user: Optional[str] = None, assets: Optional[list[cognite.client.data_classes.data_modeling.data_types.DirectRelationReference]] = None, mime_type: Optional[str] = None, directory: Optional[str] = None, is_uploaded: Optional[bool] = None, uploaded_time: Optional[datetime] = None, category: Optional[DirectRelationReference] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _CogniteFileProperties, TypedNode

This represents the reading format of Cognite file.

It is used when data is read from CDF.

Represents files.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite file.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • source_id (str | None) – Identifier from the source system

  • source_context (str | None) – Context of the source id. For systems where the sourceId is globally unique, the sourceContext is expected to not be set.

  • source (DirectRelationReference | None) – Direct relation to a source system

  • source_created_time (datetime | None) – When the instance was created in source system (if available)

  • source_updated_time (datetime | None) – When the instance was last updated in the source system (if available)

  • source_created_user (str | None) – User identifier from the source system on who created the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_updated_user (str | None) – User identifier from the source system on who last updated the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • assets (list[DirectRelationReference] | None) – A list of assets this file is related to.

  • mime_type (str | None) – The MIME type of the file.

  • directory (str | None) – Contains the path elements from the source (if the source system has a file system hierarchy or similar.)

  • is_uploaded (bool | None) – Specifies if the file content has been uploaded to Cognite Data Fusion or not.

  • uploaded_time (datetime | None) – The time the file upload completed.

  • category (DirectRelationReference | None) – Specifies the detected category the file belongs to. It’s a direct relation to an instance of CogniteFileCategory.

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteFileApply(space: str, external_id: str, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, source_id: Optional[str] = None, source_context: Optional[str] = None, source: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, source_created_time: Optional[datetime] = None, source_updated_time: Optional[datetime] = None, source_created_user: Optional[str] = None, source_updated_user: Optional[str] = None, assets: Optional[list[cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str]]] = None, mime_type: Optional[str] = None, directory: Optional[str] = None, category: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _CogniteFileProperties, TypedNodeApply

This represents the writing format of Cognite file.

It is used when data is written to CDF.

Represents files.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite file.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • source_id (str | None) – Identifier from the source system

  • source_context (str | None) – Context of the source id. For systems where the sourceId is globally unique, the sourceContext is expected to not be set.

  • source (DirectRelationReference | tuple[str, str] | None) – Direct relation to a source system

  • source_created_time (datetime | None) – When the instance was created in source system (if available)

  • source_updated_time (datetime | None) – When the instance was last updated in the source system (if available)

  • source_created_user (str | None) – User identifier from the source system on who created the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_updated_user (str | None) – User identifier from the source system on who last updated the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • assets (list[DirectRelationReference | tuple[str, str]] | None) – A list of assets this file is related to.

  • mime_type (str | None) – The MIME type of the file.

  • directory (str | None) – Contains the path elements from the source (if the source system has a file system hierarchy or similar.)

  • category (DirectRelationReference | tuple[str, str] | None) – Specifies the detected category the file belongs to. It’s a direct relation to an instance of CogniteFileCategory.

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteFileCategory(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, code: str, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, standard: Optional[str] = None, standard_reference: Optional[str] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _CogniteFileCategoryProperties, TypedNode

This represents the reading format of Cognite file category.

It is used when data is read from CDF.

Represents the categories of files as determined by contextualization or categorization.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite file category.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • code (str) – An identifier for the category, for example, ‘AA’ for Accounting (from Norsok.)

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • standard (str | None) – The name of the standard the category originates from, for example, ‘Norsok’.

  • standard_reference (str | None) – A reference to the source of the category standard.

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteFileCategoryApply(space: str, external_id: str, *, code: str, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, standard: Optional[str] = None, standard_reference: Optional[str] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _CogniteFileCategoryProperties, TypedNodeApply

This represents the writing format of Cognite file category.

It is used when data is written to CDF.

Represents the categories of files as determined by contextualization or categorization.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite file category.

  • code (str) – An identifier for the category, for example, ‘AA’ for Accounting (from Norsok.)

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • standard (str | None) – The name of the standard the category originates from, for example, ‘Norsok’.

  • standard_reference (str | None) – A reference to the source of the category standard.

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.CognitePointCloudModel(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, model_type: Optional[Literal['CAD', 'Image360', 'PointCloud']] = None, thumbnail: Optional[DirectRelationReference] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _CognitePointCloudModelProperties, TypedNode

This represents the reading format of Cognite point cloud model.

It is used when data is read from CDF.

Navigational aid for traversing CognitePointCloudModel instances

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite point cloud model.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • model_type (Literal['CAD', 'Image360', 'PointCloud'] | None) – CAD, PointCloud or Image360

  • thumbnail (DirectRelationReference | None) – Thumbnail of the 3D model

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CognitePointCloudModelApply(space: str, external_id: str, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, model_type: Optional[Literal['CAD', 'Image360', 'PointCloud']] = None, thumbnail: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _CognitePointCloudModelProperties, TypedNodeApply

This represents the writing format of Cognite point cloud model.

It is used when data is written to CDF.

Navigational aid for traversing CognitePointCloudModel instances

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite point cloud model.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • model_type (Literal['CAD', 'Image360', 'PointCloud'] | None) – CAD, PointCloud or Image360

  • thumbnail (DirectRelationReference | tuple[str, str] | None) – Thumbnail of the 3D model

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.CognitePointCloudRevision(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, status: Optional[Literal['Done', 'Failed', 'Processing', 'Queued']] = None, published: Optional[bool] = None, revision_type: Optional[Literal['CAD', 'Image360', 'PointCloud']] = None, model_3d: Optional[DirectRelationReference] = None, revision_id: Optional[int] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _CognitePointCloudRevisionProperties, TypedNode

This represents the reading format of Cognite point cloud revision.

It is used when data is read from CDF.

Navigational aid for traversing CognitePointCloudRevision instances

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite point cloud revision.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • status (Literal['Done', 'Failed', 'Processing', 'Queued'] | None) – The status field.

  • published (bool | None) – The published field.

  • revision_type (Literal['CAD', 'Image360', 'PointCloud'] | None) – The revision type field.

  • model_3d (DirectRelationReference | None) –

    .

  • revision_id (int | None) – The 3D API revision identifier for this PointCloud model

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CognitePointCloudRevisionApply(space: str, external_id: str, *, status: Optional[Literal['Done', 'Failed', 'Processing', 'Queued']] = None, published: Optional[bool] = None, revision_type: Optional[Literal['CAD', 'Image360', 'PointCloud']] = None, model_3d: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, revision_id: Optional[int] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _CognitePointCloudRevisionProperties, TypedNodeApply

This represents the writing format of Cognite point cloud revision.

It is used when data is written to CDF.

Navigational aid for traversing CognitePointCloudRevision instances

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite point cloud revision.

  • status (Literal['Done', 'Failed', 'Processing', 'Queued'] | None) – The status field.

  • published (bool | None) – The published field.

  • revision_type (Literal['CAD', 'Image360', 'PointCloud'] | None) – The revision type field.

  • model_3d (DirectRelationReference | tuple[str, str] | None) –

    .

  • revision_id (int | None) – The 3D API revision identifier for this PointCloud model

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.CognitePointCloudVolume(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, object_3d: Optional[DirectRelationReference] = None, model_3d: Optional[DirectRelationReference] = None, volume_references: Optional[list[str]] = None, revisions: Optional[list[cognite.client.data_classes.data_modeling.data_types.DirectRelationReference]] = None, volume_type: Optional[Literal['Box', 'Cylinder']] = None, volume: Optional[list[float]] = None, format_version: Optional[str] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _CognitePointCloudVolumeProperties, TypedNode

This represents the reading format of Cognite point cloud volume.

It is used when data is read from CDF.

PointCloud volume definition

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite point cloud volume.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • object_3d (DirectRelationReference | None) – Direct relation to object3D grouping for this node

  • model_3d (DirectRelationReference | None) – Direct relation to Cognite3DModel instance

  • volume_references (list[str] | None) – Unique volume metric hashes used to access the 3D specialized data storage

  • revisions (list[DirectRelationReference] | None) – List of direct relations to revision information

  • volume_type (Literal['Box', 'Cylinder'] | None) – Type of volume (Cylinder or Box)

  • volume (list[float] | None) – Relevant coordinates for the volume type, 9 floats in total, that defines the volume

  • format_version (str | None) – Specifies the version the ‘volume’ field is following. Volume definition is today 9 floats (property volume)

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CognitePointCloudVolumeApply(space: str, external_id: str, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, object_3d: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, model_3d: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, volume_references: Optional[list[str]] = None, revisions: Optional[list[cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str]]] = None, volume_type: Optional[Literal['Box', 'Cylinder']] = None, volume: Optional[list[float]] = None, format_version: Optional[str] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _CognitePointCloudVolumeProperties, TypedNodeApply

This represents the writing format of Cognite point cloud volume.

It is used when data is written to CDF.

PointCloud volume definition

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite point cloud volume.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • object_3d (DirectRelationReference | tuple[str, str] | None) – Direct relation to object3D grouping for this node

  • model_3d (DirectRelationReference | tuple[str, str] | None) – Direct relation to Cognite3DModel instance

  • volume_references (list[str] | None) – Unique volume metric hashes used to access the 3D specialized data storage

  • revisions (list[DirectRelationReference | tuple[str, str]] | None) – List of direct relations to revision information

  • volume_type (Literal['Box', 'Cylinder'] | None) – Type of volume (Cylinder or Box)

  • volume (list[float] | None) – Relevant coordinates for the volume type, 9 floats in total, that defines the volume

  • format_version (str | None) – Specifies the version the ‘volume’ field is following. Volume definition is today 9 floats (property volume)

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteSchedulable(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, start_time: Optional[datetime] = None, end_time: Optional[datetime] = None, scheduled_start_time: Optional[datetime] = None, scheduled_end_time: Optional[datetime] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _CogniteSchedulableProperties, TypedNode

This represents the reading format of Cognite schedulable.

It is used when data is read from CDF.

CogniteSchedulable represents the metadata about when an activity (or similar) starts and ends.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite schedulable.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • start_time (datetime | None) – The actual start time of an activity (or similar that extends this)

  • end_time (datetime | None) – The actual end time of an activity (or similar that extends this)

  • scheduled_start_time (datetime | None) – The planned start time of an activity (or similar that extends this)

  • scheduled_end_time (datetime | None) – The planned end time of an activity (or similar that extends this)

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteSchedulableApply(space: str, external_id: str, *, start_time: Optional[datetime] = None, end_time: Optional[datetime] = None, scheduled_start_time: Optional[datetime] = None, scheduled_end_time: Optional[datetime] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _CogniteSchedulableProperties, TypedNodeApply

This represents the writing format of Cognite schedulable.

It is used when data is written to CDF.

CogniteSchedulable represents the metadata about when an activity (or similar) starts and ends.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite schedulable.

  • start_time (datetime | None) – The actual start time of an activity (or similar that extends this)

  • end_time (datetime | None) – The actual end time of an activity (or similar that extends this)

  • scheduled_start_time (datetime | None) – The planned start time of an activity (or similar that extends this)

  • scheduled_end_time (datetime | None) – The planned end time of an activity (or similar that extends this)

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteSourceSystem(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, source_system_version: Optional[str] = None, manufacturer: Optional[str] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _CogniteSourceSystemProperties, TypedNode

This represents the reading format of Cognite source system.

It is used when data is read from CDF.

The CogniteSourceSystem core concept is used to standardize the way source system is stored.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite source system.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • source_system_version (str | None) – Version identifier for the source system

  • manufacturer (str | None) – Manufacturer of the source system

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteSourceSystemApply(space: str, external_id: str, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, source_system_version: Optional[str] = None, manufacturer: Optional[str] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _CogniteSourceSystemProperties, TypedNodeApply

This represents the writing format of Cognite source system.

It is used when data is written to CDF.

The CogniteSourceSystem core concept is used to standardize the way source system is stored.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite source system.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • source_system_version (str | None) – Version identifier for the source system

  • manufacturer (str | None) – Manufacturer of the source system

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteSourceableEdge(space: str, external_id: str, type: DirectRelationReference, start_node: DirectRelationReference, end_node: DirectRelationReference, version: int, last_updated_time: int, created_time: int, *, source_id: Optional[str] = None, source_context: Optional[str] = None, source: Optional[DirectRelationReference] = None, source_created_time: Optional[datetime] = None, source_updated_time: Optional[datetime] = None, source_created_user: Optional[str] = None, source_updated_user: Optional[str] = None, deleted_time: Optional[int] = None)

Bases: _CogniteSourceableProperties, TypedEdge

This represents the reading format of Cognite sourceable edge.

It is used when data is read from CDF.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite sourceable edge.

  • type (DirectRelationReference) – The type of edge.

  • start_node (DirectRelationReference) – Reference to the direct relation. The reference consists of a space and an external-id.

  • end_node (DirectRelationReference) – Reference to the direct relation. The reference consists of a space and an external-id.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • source_id (str | None) – Identifier from the source system

  • source_context (str | None) – Context of the source id. For systems where the sourceId is globally unique, the sourceContext is expected to not be set.

  • source (DirectRelationReference | None) – Direct relation to a source system

  • source_created_time (datetime | None) – When the instance was created in source system (if available)

  • source_updated_time (datetime | None) – When the instance was last updated in the source system (if available)

  • source_created_user (str | None) – User identifier from the source system on who created the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_updated_user (str | None) – User identifier from the source system on who last updated the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteSourceableEdgeApply(space: str, external_id: str, type: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], start_node: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], end_node: cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str], *, source_id: Optional[str] = None, source_context: Optional[str] = None, source: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, source_created_time: Optional[datetime] = None, source_updated_time: Optional[datetime] = None, source_created_user: Optional[str] = None, source_updated_user: Optional[str] = None, existing_version: Optional[int] = None)

Bases: _CogniteSourceableProperties, TypedEdgeApply

This represents the writing format of Cognite sourceable edge.

It is used when data is written to CDF.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite sourceable edge.

  • type (DirectRelationReference | tuple[str, str]) – The type of edge.

  • start_node (DirectRelationReference | tuple[str, str]) – Reference to the direct relation. The reference consists of a space and an external-id.

  • end_node (DirectRelationReference | tuple[str, str]) – Reference to the direct relation. The reference consists of a space and an external-id.

  • source_id (str | None) – Identifier from the source system

  • source_context (str | None) – Context of the source id. For systems where the sourceId is globally unique, the sourceContext is expected to not be set.

  • source (DirectRelationReference | tuple[str, str] | None) – Direct relation to a source system

  • source_created_time (datetime | None) – When the instance was created in source system (if available)

  • source_updated_time (datetime | None) – When the instance was last updated in the source system (if available)

  • source_created_user (str | None) – User identifier from the source system on who created the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_updated_user (str | None) – User identifier from the source system on who last updated the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • existing_version (int | None) – Fail the ingestion request if the edge’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the edge (for the specified container or edge). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteSourceableNode(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, source_id: Optional[str] = None, source_context: Optional[str] = None, source: Optional[DirectRelationReference] = None, source_created_time: Optional[datetime] = None, source_updated_time: Optional[datetime] = None, source_created_user: Optional[str] = None, source_updated_user: Optional[str] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _CogniteSourceableProperties, TypedNode

This represents the reading format of Cognite sourceable node.

It is used when data is read from CDF.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite sourceable node.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • source_id (str | None) – Identifier from the source system

  • source_context (str | None) – Context of the source id. For systems where the sourceId is globally unique, the sourceContext is expected to not be set.

  • source (DirectRelationReference | None) – Direct relation to a source system

  • source_created_time (datetime | None) – When the instance was created in source system (if available)

  • source_updated_time (datetime | None) – When the instance was last updated in the source system (if available)

  • source_created_user (str | None) – User identifier from the source system on who created the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_updated_user (str | None) – User identifier from the source system on who last updated the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteSourceableNodeApply(space: str, external_id: str, *, source_id: Optional[str] = None, source_context: Optional[str] = None, source: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, source_created_time: Optional[datetime] = None, source_updated_time: Optional[datetime] = None, source_created_user: Optional[str] = None, source_updated_user: Optional[str] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _CogniteSourceableProperties, TypedNodeApply

This represents the writing format of Cognite sourceable node.

It is used when data is written to CDF.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite sourceable node.

  • source_id (str | None) – Identifier from the source system

  • source_context (str | None) – Context of the source id. For systems where the sourceId is globally unique, the sourceContext is expected to not be set.

  • source (DirectRelationReference | tuple[str, str] | None) – Direct relation to a source system

  • source_created_time (datetime | None) – When the instance was created in source system (if available)

  • source_updated_time (datetime | None) – When the instance was last updated in the source system (if available)

  • source_created_user (str | None) – User identifier from the source system on who created the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_updated_user (str | None) – User identifier from the source system on who last updated the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteTimeSeries(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, is_step: bool, time_series_type: Literal['numeric', 'string'], name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, source_id: Optional[str] = None, source_context: Optional[str] = None, source: Optional[DirectRelationReference] = None, source_created_time: Optional[datetime] = None, source_updated_time: Optional[datetime] = None, source_created_user: Optional[str] = None, source_updated_user: Optional[str] = None, source_unit: Optional[str] = None, unit: Optional[DirectRelationReference] = None, assets: Optional[list[cognite.client.data_classes.data_modeling.data_types.DirectRelationReference]] = None, equipment: Optional[list[cognite.client.data_classes.data_modeling.data_types.DirectRelationReference]] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _CogniteTimeSeriesProperties, TypedNode

This represents the reading format of Cognite time series.

It is used when data is read from CDF.

Represents a series of data points in time order.”

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite time series.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • is_step (bool) – Specifies whether the time series is a step time series or not.

  • time_series_type (Literal['numeric', 'string']) – Specifies the data type of the data points.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • source_id (str | None) – Identifier from the source system

  • source_context (str | None) – Context of the source id. For systems where the sourceId is globally unique, the sourceContext is expected to not be set.

  • source (DirectRelationReference | None) – Direct relation to a source system

  • source_created_time (datetime | None) – When the instance was created in source system (if available)

  • source_updated_time (datetime | None) – When the instance was last updated in the source system (if available)

  • source_created_user (str | None) – User identifier from the source system on who created the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_updated_user (str | None) – User identifier from the source system on who last updated the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_unit (str | None) – The unit specified in the source system.

  • unit (DirectRelationReference | None) – The unit of the time series.

  • assets (list[DirectRelationReference] | None) – A list of assets the time series is related to.

  • equipment (list[DirectRelationReference] | None) – A list of equipment the time series is related to.

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteTimeSeriesApply(space: str, external_id: str, *, is_step: bool, time_series_type: Literal['numeric', 'string'], name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, source_id: Optional[str] = None, source_context: Optional[str] = None, source: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, source_created_time: Optional[datetime] = None, source_updated_time: Optional[datetime] = None, source_created_user: Optional[str] = None, source_updated_user: Optional[str] = None, source_unit: Optional[str] = None, unit: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, assets: Optional[list[cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str]]] = None, equipment: Optional[list[cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str]]] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _CogniteTimeSeriesProperties, TypedNodeApply

This represents the writing format of Cognite time series.

It is used when data is written to CDF.

Represents a series of data points in time order.”

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite time series.

  • is_step (bool) – Specifies whether the time series is a step time series or not.

  • time_series_type (Literal['numeric', 'string']) – Specifies the data type of the data points.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • source_id (str | None) – Identifier from the source system

  • source_context (str | None) – Context of the source id. For systems where the sourceId is globally unique, the sourceContext is expected to not be set.

  • source (DirectRelationReference | tuple[str, str] | None) – Direct relation to a source system

  • source_created_time (datetime | None) – When the instance was created in source system (if available)

  • source_updated_time (datetime | None) – When the instance was last updated in the source system (if available)

  • source_created_user (str | None) – User identifier from the source system on who created the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_updated_user (str | None) – User identifier from the source system on who last updated the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_unit (str | None) – The unit specified in the source system.

  • unit (DirectRelationReference | tuple[str, str] | None) – The unit of the time series.

  • assets (list[DirectRelationReference | tuple[str, str]] | None) – A list of assets the time series is related to.

  • equipment (list[DirectRelationReference | tuple[str, str]] | None) – A list of equipment the time series is related to.

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteUnit(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, symbol: Optional[str] = None, quantity: Optional[str] = None, source: Optional[str] = None, source_reference: Optional[str] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _CogniteUnitProperties, TypedNode

This represents the reading format of Cognite unit.

It is used when data is read from CDF.

Represents a single unit of measurement

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite unit.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • symbol (str | None) – The symbol for the unit of measurement

  • quantity (str | None) – Specifies the physical quantity the unit measures

  • source (str | None) – Source of the unit definition

  • source_reference (str | None) – Reference to the source of the unit definition

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteUnitApply(space: str, external_id: str, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, symbol: Optional[str] = None, quantity: Optional[str] = None, source: Optional[str] = None, source_reference: Optional[str] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _CogniteUnitProperties, TypedNodeApply

This represents the writing format of Cognite unit.

It is used when data is written to CDF.

Represents a single unit of measurement

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite unit.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • symbol (str | None) – The symbol for the unit of measurement

  • quantity (str | None) – Specifies the physical quantity the unit measures

  • source (str | None) – Source of the unit definition

  • source_reference (str | None) – Reference to the source of the unit definition

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteVisualizable(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, object_3d: Optional[DirectRelationReference] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _CogniteVisualizableProperties, TypedNode

This represents the reading format of Cognite visualizable.

It is used when data is read from CDF.

CogniteVisualizable defines the standard way to reference a related 3D resource

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite visualizable.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • object_3d (DirectRelationReference | None) – Direct relation to an Object3D instance representing the 3D resource

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.cdm.v1.CogniteVisualizableApply(space: str, external_id: str, *, object_3d: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _CogniteVisualizableProperties, TypedNodeApply

This represents the writing format of Cognite visualizable.

It is used when data is written to CDF.

CogniteVisualizable defines the standard way to reference a related 3D resource

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite visualizable.

  • object_3d (DirectRelationReference | tuple[str, str] | None) – Direct relation to an Object3D instance representing the 3D resource

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

Extractor Extensions

class cognite.client.data_classes.data_modeling.extractor_extensions.v1.CogniteExtractorData(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, extracted_data: Optional[dict] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _CogniteExtractorDataProperties, TypedNode

This represents the reading format of Cognite extractor datum.

It is used when data is read from CDF.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite extractor datum.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • extracted_data (dict | None) – Unstructured information extracted from source system

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.extractor_extensions.v1.CogniteExtractorDataApply(space: str, external_id: str, *, extracted_data: Optional[dict] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _CogniteExtractorDataProperties, TypedNodeApply

This represents the writing format of Cognite extractor datum.

It is used when data is written to CDF.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite extractor datum.

  • extracted_data (dict | None) – Unstructured information extracted from source system

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.extractor_extensions.v1.CogniteExtractorFile(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, source_id: Optional[str] = None, source_context: Optional[str] = None, source: Optional[DirectRelationReference] = None, source_created_time: Optional[datetime] = None, source_updated_time: Optional[datetime] = None, source_created_user: Optional[str] = None, source_updated_user: Optional[str] = None, assets: Optional[list[cognite.client.data_classes.data_modeling.data_types.DirectRelationReference]] = None, mime_type: Optional[str] = None, directory: Optional[str] = None, is_uploaded: Optional[bool] = None, uploaded_time: Optional[datetime] = None, category: Optional[DirectRelationReference] = None, extracted_data: Optional[dict] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _CogniteExtractorFileProperties, TypedNode

This represents the reading format of Cognite extractor file.

It is used when data is read from CDF.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite extractor file.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • source_id (str | None) – Identifier from the source system

  • source_context (str | None) – Context of the source id. For systems where the sourceId is globally unique, the sourceContext is expected to not be set.

  • source (DirectRelationReference | None) – Direct relation to a source system

  • source_created_time (datetime | None) – When the instance was created in source system (if available)

  • source_updated_time (datetime | None) – When the instance was last updated in the source system (if available)

  • source_created_user (str | None) – User identifier from the source system on who created the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_updated_user (str | None) – User identifier from the source system on who last updated the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • assets (list[DirectRelationReference] | None) – List of assets this file relates to

  • mime_type (str | None) – MIME type of the file

  • directory (str | None) – Contains the path elements from the source (for when the source system has a file system hierarchy or similar)

  • is_uploaded (bool | None) – Whether the file content has been uploaded to Cognite Data Fusion

  • uploaded_time (datetime | None) – Point in time when the file upload was completed and the file was made available

  • category (DirectRelationReference | None) – Direct relation to an instance of CogniteFileCategory representing the detected categorization/class for the file

  • extracted_data (dict | None) – Unstructured information extracted from source system

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.extractor_extensions.v1.CogniteExtractorFileApply(space: str, external_id: str, *, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, source_id: Optional[str] = None, source_context: Optional[str] = None, source: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, source_created_time: Optional[datetime] = None, source_updated_time: Optional[datetime] = None, source_created_user: Optional[str] = None, source_updated_user: Optional[str] = None, assets: Optional[list[cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str]]] = None, mime_type: Optional[str] = None, directory: Optional[str] = None, is_uploaded: Optional[bool] = None, uploaded_time: Optional[datetime] = None, category: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, extracted_data: Optional[dict] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _CogniteExtractorFileProperties, TypedNodeApply

This represents the writing format of Cognite extractor file.

It is used when data is written to CDF.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite extractor file.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • source_id (str | None) – Identifier from the source system

  • source_context (str | None) – Context of the source id. For systems where the sourceId is globally unique, the sourceContext is expected to not be set.

  • source (DirectRelationReference | tuple[str, str] | None) – Direct relation to a source system

  • source_created_time (datetime | None) – When the instance was created in source system (if available)

  • source_updated_time (datetime | None) – When the instance was last updated in the source system (if available)

  • source_created_user (str | None) – User identifier from the source system on who created the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_updated_user (str | None) – User identifier from the source system on who last updated the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • assets (list[DirectRelationReference | tuple[str, str]] | None) – List of assets this file relates to

  • mime_type (str | None) – MIME type of the file

  • directory (str | None) – Contains the path elements from the source (for when the source system has a file system hierarchy or similar)

  • is_uploaded (bool | None) – Whether the file content has been uploaded to Cognite Data Fusion

  • uploaded_time (datetime | None) – Point in time when the file upload was completed and the file was made available

  • category (DirectRelationReference | tuple[str, str] | None) – Direct relation to an instance of CogniteFileCategory representing the detected categorization/class for the file

  • extracted_data (dict | None) – Unstructured information extracted from source system

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.

class cognite.client.data_classes.data_modeling.extractor_extensions.v1.CogniteExtractorTimeSeries(space: str, external_id: str, version: int, last_updated_time: int, created_time: int, *, is_step: bool, time_series_type: Literal['numeric', 'string'], name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, source_id: Optional[str] = None, source_context: Optional[str] = None, source: Optional[DirectRelationReference] = None, source_created_time: Optional[datetime] = None, source_updated_time: Optional[datetime] = None, source_created_user: Optional[str] = None, source_updated_user: Optional[str] = None, source_unit: Optional[str] = None, unit: Optional[DirectRelationReference] = None, assets: Optional[list[cognite.client.data_classes.data_modeling.data_types.DirectRelationReference]] = None, equipment: Optional[list[cognite.client.data_classes.data_modeling.data_types.DirectRelationReference]] = None, extracted_data: Optional[dict] = None, type: Optional[DirectRelationReference] = None, deleted_time: Optional[int] = None)

Bases: _CogniteExtractorTimeSeriesProperties, TypedNode

This represents the reading format of Cognite extractor time series.

It is used when data is read from CDF.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite extractor time series.

  • version (int) – DMS version.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • is_step (bool) – Defines whether the time series is a step series or not.

  • time_series_type (Literal['numeric', 'string']) – Defines data type of the data points.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • source_id (str | None) – Identifier from the source system

  • source_context (str | None) – Context of the source id. For systems where the sourceId is globally unique, the sourceContext is expected to not be set.

  • source (DirectRelationReference | None) – Direct relation to a source system

  • source_created_time (datetime | None) – When the instance was created in source system (if available)

  • source_updated_time (datetime | None) – When the instance was last updated in the source system (if available)

  • source_created_user (str | None) – User identifier from the source system on who created the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_updated_user (str | None) – User identifier from the source system on who last updated the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_unit (str | None) – Unit as specified in the source system

  • unit (DirectRelationReference | None) – direct relation to the unit of the time series

  • assets (list[DirectRelationReference] | None) – The asset field.

  • equipment (list[DirectRelationReference] | None) – The equipment field.

  • extracted_data (dict | None) – Unstructured information extracted from source system

  • type (DirectRelationReference | None) – Direct relation pointing to the type node.

  • deleted_time (int | None) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. Timestamp when the instance was soft deleted. Note that deleted instances are filtered out of query results, but present in sync results

class cognite.client.data_classes.data_modeling.extractor_extensions.v1.CogniteExtractorTimeSeriesApply(space: str, external_id: str, *, is_step: bool, time_series_type: Literal['numeric', 'string'], name: Optional[str] = None, description: Optional[str] = None, tags: Optional[list[str]] = None, aliases: Optional[list[str]] = None, source_id: Optional[str] = None, source_context: Optional[str] = None, source: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, source_created_time: Optional[datetime] = None, source_updated_time: Optional[datetime] = None, source_created_user: Optional[str] = None, source_updated_user: Optional[str] = None, source_unit: Optional[str] = None, unit: Optional[Union[DirectRelationReference, tuple[str, str]]] = None, assets: Optional[list[cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str]]] = None, equipment: Optional[list[cognite.client.data_classes.data_modeling.data_types.DirectRelationReference | tuple[str, str]]] = None, extracted_data: Optional[dict] = None, existing_version: Optional[int] = None, type: Optional[Union[DirectRelationReference, tuple[str, str]]] = None)

Bases: _CogniteExtractorTimeSeriesProperties, TypedNodeApply

This represents the writing format of Cognite extractor time series.

It is used when data is written to CDF.

Parameters
  • space (str) – The space where the node is located.

  • external_id (str) – The external id of the Cognite extractor time series.

  • is_step (bool) – Defines whether the time series is a step series or not.

  • time_series_type (Literal['numeric', 'string']) – Defines data type of the data points.

  • name (str | None) – Name of the instance

  • description (str | None) – Description of the instance

  • tags (list[str] | None) – Text based labels for generic use, limited to 1000

  • aliases (list[str] | None) – Alternative names for the node

  • source_id (str | None) – Identifier from the source system

  • source_context (str | None) – Context of the source id. For systems where the sourceId is globally unique, the sourceContext is expected to not be set.

  • source (DirectRelationReference | tuple[str, str] | None) – Direct relation to a source system

  • source_created_time (datetime | None) – When the instance was created in source system (if available)

  • source_updated_time (datetime | None) – When the instance was last updated in the source system (if available)

  • source_created_user (str | None) – User identifier from the source system on who created the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_updated_user (str | None) – User identifier from the source system on who last updated the source data. This identifier is not guaranteed to match the user identifiers in CDF

  • source_unit (str | None) – Unit as specified in the source system

  • unit (DirectRelationReference | tuple[str, str] | None) – direct relation to the unit of the time series

  • assets (list[DirectRelationReference | tuple[str, str]] | None) – The asset field.

  • equipment (list[DirectRelationReference | tuple[str, str]] | None) – The equipment field.

  • extracted_data (dict | None) – Unstructured information extracted from source system

  • existing_version (int | None) – Fail the ingestion request if the node’s version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the node (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request.

  • type (DirectRelationReference | tuple[str, str] | None) – Direct relation pointing to the type node.