Apply DML
- async AsyncCogniteClient.data_modeling.graphql.apply_dml(
- id: DataModelId | tuple[str, str] | tuple[str, str, str],
- dml: str,
- name: str | None = None,
- description: str | None = None,
- previous_version: str | None = None,
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, AsyncCogniteClient >>> client = CogniteClient() >>> # async_client = AsyncCogniteClient() # another option >>> res = client.data_modeling.graphql.apply_dml( ... id=("mySpaceExternalId", "myModelExternalId", "1"), ... dml="type MyType { id: String! }", ... name="My model name", ... description="My model description", ... )