Call
- async AsyncCogniteClient.raw.rows.__call__(
- db_name: str,
- table_name: str,
- chunk_size: int | None = None,
- partitions: int | None = None,
- limit: int | None = None,
- min_last_updated_time: int | None = None,
- max_last_updated_time: int | None = None,
- columns: list[str] | None = None,
Iterate over rows.
Fetches rows as they are iterated over, so you keep a limited number of rows in memory.
Note
When iterating using partitions > 1, the memory usage is bounded at 2 x partitions x chunk_size. This is implemented by halting retrieval speed when the callers code can’t keep up.
- Parameters:
db_name (str) – Name of the database.
table_name (str) – Name of the table.
chunk_size (int | None) – Number of rows to return in each chunk (may be lower). Defaults to yielding one row at a time. Note: When used together with ‘partitions’ the default is 10000 (matching the API limit) and there’s an implicit minimum of 1000 rows.
partitions (int | None) – Retrieve rows in parallel using this number of workers. Defaults to not use concurrency. The setting is capped at
global_config.concurrency_settings.raw.readand _can_ be used with a finite limit. To prevent unexpected problems and maximize read throughput, check out concurrency limits in the API documentation.limit (int | None) – Maximum number of rows to return. Can be used with partitions. Defaults to returning all items.
min_last_updated_time (int | None) – Rows must have been last updated after this time (exclusive). Milliseconds since epoch.
max_last_updated_time (int | None) – Rows must have been last updated before this time (inclusive). Milliseconds since epoch.
columns (list[str] | None) – List of column keys. Set to None to retrieving all, use empty list, [], to retrieve only row keys.
- Yields:
Row | RowList – An iterator yielding the requested row or rows.