Retrieve
- async AsyncCogniteClient.data_modeling.streams.retrieve(
- external_id: str,
- include_statistics: bool | None = None,
-
- Parameters:
external_id (str) – External ID of the stream to retrieve.
include_statistics (bool | None) – When
True, usage statistics will be returned together with stream settings. Computing statistics can be expensive.
- Returns:
The stream metadata (and optionally statistics), or
Noneif not found.- Return type:
Stream | None
Examples
Retrieve a stream by external ID:
>>> from cognite.client import CogniteClient >>> client = CogniteClient() >>> # async_client = AsyncCogniteClient() # another option >>> res = client.data_modeling.streams.retrieve("my-stream")
Retrieve a stream with usage statistics:
>>> res = client.data_modeling.streams.retrieve( ... "my-stream", ... include_statistics=True, ... )