Collects responses from ExecuteQuery requests and parses them into QueryResultRows.
Please Notethis is not meant to be constructed directly by applications. It should always
be created via the client. The constructor is subject to change.
It isnot thread-safe. It should not be used by multiple threads.
Parameters
client– bigtable client
instance_id– id of the instance on which the query is executed
request_body– dict representing the body of the ExecuteQueryRequest
attempt_timeout– the time budget for an individual network request, in seconds.
If it takes longer than this time to complete, the request will be cancelled with
a DeadlineExceeded exception, and a retry will be attempted.
operation_timeout– the time budget for the entire operation, in seconds.
Failed requests will be retried within the budget
req_metadata– metadata used while sending the gRPC request
retryable_excs– a list of errors that will be retried if encountered.
Raises
None–
ValueError <exceptions.ValueError>` as a safeguard if data is processed in an unexpected stat–
_next_()
Yields QueryResultRows representing the results of the query.
Raises
ValueErroras a safeguard if data is processed in an unexpected state
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["Version latestkeyboard_arrow_down\n\n- [2.32.0 (latest)](/python/docs/reference/bigtable/latest/sync_data_execute_query_iterator)\n- [2.31.0](/python/docs/reference/bigtable/2.31.0/sync_data_execute_query_iterator)\n- [2.30.1](/python/docs/reference/bigtable/2.30.1/sync_data_execute_query_iterator)\n- [2.29.0](/python/docs/reference/bigtable/2.29.0/sync_data_execute_query_iterator)\n- [2.28.1](/python/docs/reference/bigtable/2.28.1/sync_data_execute_query_iterator)\n- [2.26.0](/python/docs/reference/bigtable/2.26.0/sync_data_execute_query_iterator)\n- [2.25.0](/python/docs/reference/bigtable/2.25.0/sync_data_execute_query_iterator)\n- [2.24.0](/python/docs/reference/bigtable/2.24.0/sync_data_execute_query_iterator)\n- [2.23.1](/python/docs/reference/bigtable/2.23.1/sync_data_execute_query_iterator)\n- [2.22.0](/python/docs/reference/bigtable/2.22.0/sync_data_execute_query_iterator)\n- [2.21.0](/python/docs/reference/bigtable/2.21.0/sync_data_execute_query_iterator)\n- [2.20.0](/python/docs/reference/bigtable/2.20.0/sync_data_execute_query_iterator)\n- [2.19.0](/python/docs/reference/bigtable/2.19.0/sync_data_execute_query_iterator)\n- [2.18.1](/python/docs/reference/bigtable/2.18.1/sync_data_execute_query_iterator)\n- [2.17.0](/python/docs/reference/bigtable/2.17.0/sync_data_execute_query_iterator)\n- [2.16.0](/python/docs/reference/bigtable/2.16.0/sync_data_execute_query_iterator)\n- [2.15.0](/python/docs/reference/bigtable/2.15.0/sync_data_execute_query_iterator)\n- [2.14.1](/python/docs/reference/bigtable/2.14.1/sync_data_execute_query_iterator)\n- [2.13.2](/python/docs/reference/bigtable/2.13.2/sync_data_execute_query_iterator)\n- [2.12.0](/python/docs/reference/bigtable/2.12.0/sync_data_execute_query_iterator)\n- [2.11.3](/python/docs/reference/bigtable/2.11.3/sync_data_execute_query_iterator)\n- [2.10.1](/python/docs/reference/bigtable/2.10.1/sync_data_execute_query_iterator)\n- [2.9.0](/python/docs/reference/bigtable/2.9.0/sync_data_execute_query_iterator)\n- [2.8.1](/python/docs/reference/bigtable/2.8.1/sync_data_execute_query_iterator)\n- [2.7.1](/python/docs/reference/bigtable/2.7.1/sync_data_execute_query_iterator)\n- [2.6.0](/python/docs/reference/bigtable/2.6.0/sync_data_execute_query_iterator)\n- [2.5.2](/python/docs/reference/bigtable/2.5.2/sync_data_execute_query_iterator)\n- [2.4.0](/python/docs/reference/bigtable/2.4.0/sync_data_execute_query_iterator)\n- [2.3.3](/python/docs/reference/bigtable/2.3.3/sync_data_execute_query_iterator)\n- [2.2.0](/python/docs/reference/bigtable/2.2.0/sync_data_execute_query_iterator)\n- [2.1.0](/python/docs/reference/bigtable/2.1.0/sync_data_execute_query_iterator)\n- [2.0.0](/python/docs/reference/bigtable/2.0.0/sync_data_execute_query_iterator)\n- [1.7.3](/python/docs/reference/bigtable/1.7.3/sync_data_execute_query_iterator)\n- [1.6.1](/python/docs/reference/bigtable/1.6.1/sync_data_execute_query_iterator)\n- [1.5.1](/python/docs/reference/bigtable/1.5.1/sync_data_execute_query_iterator)\n- [1.4.0](/python/docs/reference/bigtable/1.4.0/sync_data_execute_query_iterator)\n- [1.3.0](/python/docs/reference/bigtable/1.3.0/sync_data_execute_query_iterator)\n- [1.2.1](/python/docs/reference/bigtable/1.2.1/sync_data_execute_query_iterator)\n- [1.1.0](/python/docs/reference/bigtable/1.1.0/sync_data_execute_query_iterator)\n- [1.0.0](/python/docs/reference/bigtable/1.0.0/sync_data_execute_query_iterator)\n- [0.34.0](/python/docs/reference/bigtable/0.34.0/sync_data_execute_query_iterator) \n\nExecute Query Iterator\n======================\n\n### *class* google.cloud.bigtable.data.execute_query.ExecuteQueryIterator(client: DataClientType, instance_id: [str](https://docs.python.org/3/library/stdtypes.html#str), app_profile_id: Optional\\[[str](https://docs.python.org/3/library/stdtypes.html#str)\\], request_body: Dict\\[[str](https://docs.python.org/3/library/stdtypes.html#str), Any\\], prepare_metadata: [Metadata](/python/docs/reference/bigtable/latest/common_data_execute_query_metadata#google.cloud.bigtable.data.execute_query.metadata.Metadata), attempt_timeout: [float](https://docs.python.org/3/library/functions.html#float) \\| [None](https://docs.python.org/3/library/constants.html#None), operation_timeout: [float](https://docs.python.org/3/library/functions.html#float), req_metadata: Sequence\\[Tuple\\[[str](https://docs.python.org/3/library/stdtypes.html#str), [str](https://docs.python.org/3/library/stdtypes.html#str)\\]\\] = (), retryable_excs: Sequence\\[[type](https://docs.python.org/3/library/functions.html#type)\\[[Exception](https://docs.python.org/3/library/exceptions.html#Exception)\\]\\] = ())\n\nBases: [`object`](https://docs.python.org/3/library/functions.html#object)\n\nCollects responses from ExecuteQuery requests and parses them into QueryResultRows.\n\n**Please Note** this is not meant to be constructed directly by applications. It should always\nbe created via the client. The constructor is subject to change.\n\nIt is **not thread-safe**. It should not be used by multiple threads.\n\n- **Parameters**\n\n - **client** -- bigtable client\n\n - **instance_id** -- id of the instance on which the query is executed\n\n - **request_body** -- dict representing the body of the ExecuteQueryRequest\n\n - **attempt_timeout** -- the time budget for an individual network request, in seconds.\n If it takes longer than this time to complete, the request will be cancelled with\n a DeadlineExceeded exception, and a retry will be attempted.\n\n - **operation_timeout** -- the time budget for the entire operation, in seconds.\n Failed requests will be retried within the budget\n\n - **req_metadata** -- metadata used while sending the gRPC request\n\n - **retryable_excs** -- a list of errors that will be retried if encountered.\n\n- **Raises**\n\n - **None** --\n\n - **ValueError \\\u003cexceptions.ValueError\\\u003e\\` as a safeguard if data is processed in an unexpected stat** --\n\n#### _*next_*()\n\nYields QueryResultRows representing the results of the query.\n\n- **Raises**\n\n `ValueError` as a safeguard if data is processed in an unexpected state\n\n#### *property* app_profile_id(*: Optional\\[[str](https://docs.python.org/3/library/stdtypes.html#str)* )\n\nReturns the app_profile_id of the iterator.\n\n#### close()\n\nCancel all background tasks. Should be called all rows were processed.\n\n- **Raises**\n\n `ValueError` if called in an invalid state\n\n#### *property* is_closed(*: \\[bool\\](\u003chttps://docs.python.org/3/library/functions.html#bool\u003e* )\n\nReturns True if the iterator is closed, False otherwise.\n\n#### *property* metadata(*: \\[google.cloud.bigtable.data.execute_query.metadata.Metadata\\](common_data_execute_query_metadata.md#google.cloud.bigtable.data.execute_query.metadata.Metadata* )\n\nReturns query metadata from the server or None if the iterator has been closed\nor if metadata has not been set yet.\n\nMetadata will not be set until the first row has been yielded or response with no rows\ncompletes.\n\nraises: `EarlyMetadataCallError` when called before the first row has been returned\nor the iterator has completed with no rows in the response.\n\n#### *property* table_name(*: Optional\\[[str](https://docs.python.org/3/library/stdtypes.html#str)* )\n\nReturns the table_name of the iterator."]]