You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""`Upsert records into a stream <https://api-docs.cognite.com/20230101/tag/Records/operation/upsertRecords>`_.
141
+
142
+
Creates or fully updates records. Only valid for mutable streams (returns 422 on
143
+
immutable). When a record with the same ``space + externalId`` already exists it is
144
+
fully replaced (this endpoint does not do partial property updates); otherwise it is
145
+
created.
146
+
147
+
Args:
148
+
items (RecordWrite | Sequence[RecordWrite]): One or more records to upsert.
149
+
stream_id (str): External ID of the stream to upsert into.
150
+
upsert_mode (Literal['replace']): How existing records are updated. Currently only ``"replace"`` is supported, which fully replaces the existing record. Defaults to ``"replace"``.
151
+
152
+
Examples:
153
+
154
+
Upsert a single record:
155
+
156
+
>>> from cognite.client import CogniteClient
157
+
>>> from cognite.client.data_classes.data_modeling.records import (
0 commit comments