Aggregate data sets

async AsyncCogniteClient.data_sets.aggregate_count(
filter: DataSetFilter | dict[str, Any] | None = None,
) int

Aggregate data sets.

Parameters:

filter (DataSetFilter | dict[str, Any] | None) – Filter on data set filter with exact match

Returns:

Count of data sets matching the filter.

Return type:

int

Examples

Get the number of write-protected data sets:

>>> from cognite.client import CogniteClient, AsyncCogniteClient
>>> client = CogniteClient()
>>> # async_client = AsyncCogniteClient()  # another option
>>> aggregate_protected = client.data_sets.aggregate_count(
...     filter={"write_protected": True}
... )