Aggregate Sequences Unique Properties

async AsyncCogniteClient.sequences.aggregate_unique_properties(
path: SequenceProperty | str | list[str],
advanced_filter: Filter | dict[str, Any] | None = None,
aggregate_filter: AggregationFilter | dict[str, Any] | None = None,
filter: SequenceFilter | dict[str, Any] | None = None,
) UniqueResultList

Find approximate unique sequence properties.

Parameters:
  • path (SequenceProperty | str | list[str]) – The scope in every document to aggregate properties. The only value allowed now is [“metadata”]. It means to aggregate only metadata properties (aka keys).

  • advanced_filter (Filter | dict[str, Any] | None) – The filter to narrow down the sequences to count cardinality.

  • aggregate_filter (AggregationFilter | dict[str, Any] | None) – The filter to apply to the resulting buckets.

  • filter (SequenceFilter | dict[str, Any] | None) – The filter to narrow down the sequences to count requiring exact match.

Returns:

List of unique values of sequences matching the specified filters and search.

Return type:

UniqueResultList

Examples

Get the metadata keys with count for your sequences in your CDF project:

>>> from cognite.client import CogniteClient
>>> from cognite.client.data_classes.sequences import SequenceProperty
>>> client = CogniteClient()
>>> # async_client = AsyncCogniteClient()  # another option
>>> result = client.sequences.aggregate_unique_properties(SequenceProperty.metadata)