List
- async AsyncCogniteClient.transformations.external_data_sources.list(
- limit: int | None = 25,
- format: Literal['one_lake', 'snowflake'] | None = None,
-
- Parameters:
limit (int | None) – Maximum number of data sources to return. Defaults to 25. Set to -1, float(“inf”) or None to return all items.
format (ExternalDataSourceFormat | None) – Only return data sources of this format (“one_lake” or “snowflake”). Defaults to all formats.
- Returns:
List of external data sources.
- Return type:
Examples
List data sources:
>>> from cognite.client import CogniteClient, AsyncCogniteClient >>> client = CogniteClient() >>> # async_client = AsyncCogniteClient() # another option >>> data_sources = client.transformations.external_data_sources.list(limit=5)
List only Snowflake data sources:
>>> snowflake_sources = client.transformations.external_data_sources.list( ... format="snowflake" ... )
Iterate over data sources, one-by-one:
>>> for data_source in client.transformations.external_data_sources(): ... data_source # do something with the data source
Iterate over chunks of data sources to reduce memory load:
>>> for data_source_list in client.transformations.external_data_sources(chunk_size=25): ... data_source_list # do something with the data sources