Delete rows from a table

async AsyncCogniteClient.raw.rows.delete(
db_name: str,
table_name: str,
key: str | SequenceNotStr[str],
) None

Delete rows from a table.

Parameters:
  • db_name (str) – Name of the database.

  • table_name (str) – Name of the table.

  • key (str | SequenceNotStr[str]) – The key(s) of the row(s) to delete.

Examples

Delete rows from table:

>>> from cognite.client import CogniteClient, AsyncCogniteClient
>>> client = CogniteClient()
>>> # async_client = AsyncCogniteClient()  # another option
>>> keys_to_delete = ["k1", "k2", "k3"]
>>> client.raw.rows.delete("db1", "table1", keys_to_delete)