Iterate over data models

async AsyncCogniteClient.data_modeling.data_models.__call__(
chunk_size: int | None = None,
limit: int | None = None,
space: str | None = None,
inline_views: bool = False,
all_versions: bool = False,
include_global: bool = False,
) AsyncIterator[DataModel] | AsyncIterator[DataModelList]

Iterate over data model

Fetches data model as they are iterated over, so you keep a limited number of data model in memory.

Parameters:
  • chunk_size (int | None) – Number of data model to return in each chunk. Defaults to yielding one data_model a time.

  • limit (int | None) – Maximum number of data model to return. Defaults to returning all items.

  • space (str | None) – The space to query.

  • inline_views (bool) – Whether to expand the referenced views inline in the returned result.

  • all_versions (bool) – Whether to return all versions. If false, only the newest version is returned, which is determined based on the ‘createdTime’ field.

  • include_global (bool) – Whether to include global views.

Yields:

DataModel | DataModelList – yields DataModel one by one if chunk_size is not specified, else DataModelList objects.