2.42.0 (latest) 2.41.0 2.40.0 2.39.0 2.38.0 2.37.0 2.36.0 2.35.0 2.34.0 2.33.0 2.32.0 2.31.0 2.30.1 2.29.0 2.28.1 2.26.0 2.25.0 2.24.0 2.23.1 2.22.0 2.21.0 2.20.0 2.19.0 2.18.1 2.17.0 2.16.0 2.15.0 2.14.1 2.13.2 2.12.0 2.11.3 2.10.1 2.9.0 2.8.1 2.7.1 2.6.0 2.5.2 2.4.0 2.3.3 2.2.0 2.1.0 2.0.0 1.7.3 1.6.1 1.5.1 1.4.0 1.3.0 1.2.1 1.1.0 1.0.0 0.34.0

### *class* google.cloud.bigtable.data.execute_query.ExecuteQueryIteratorAsync(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](https://docs.cloud.google.com/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)\]\] = (), column_info: [dict](https://docs.python.org/3/library/stdtypes.html#dict)\[[str](https://docs.python.org/3/library/stdtypes.html#str), Message \| EnumTypeWrapper\] \| [None](https://docs.python.org/3/library/constants.html#None) = None)

Bases: [`object`](https://docs.python.org/3/library/functions.html#object)

Collects responses from ExecuteQuery requests and parses them into QueryResultRows.

**Please Note** this is not meant to be constructed directly by applications. It should always
be created via the client. The constructor is subject to change.

It is **not thread-safe**. It should not be used by multiple asyncio Tasks.

- **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.

  - **column_info** -- dict with mappings between column names and additional column information
    for protobuf deserialization.

- **Raises**

  - [**RuntimeError**](https://docs.python.org/3/library/exceptions.html#RuntimeError) -- if the instance is not created within an async event loop context.

  - **ValueError \<exceptions.ValueError\>\` as a safeguard if data is processed in an unexpected stat** --

#### *async* _*anext_*()

Yields QueryResultRows representing the results of the query.

- **Raises**

  `ValueError` as a safeguard if data is processed in an unexpected state

#### *property* app_profile_id(*: Optional\[[str](https://docs.python.org/3/library/stdtypes.html#str)* )

Returns the app_profile_id of the iterator.

#### *async* close()

Cancel all background tasks. Should be called after all rows were processed.

Called automatically by iterator

- **Raises**

  `ValueError` if called in an invalid state

#### *property* is_closed(*: \[bool\](<https://docs.python.org/3/library/functions.html#bool>* )

Returns True if the iterator is closed, False otherwise.

#### *property* metadata(*: \[google.cloud.bigtable.data.execute_query.metadata.Metadata\](common_data_execute_query_metadata.md#google.cloud.bigtable.data.execute_query.metadata.Metadata* )

Returns query metadata from the server or None if the iterator has been closed
or if metadata has not been set yet.

Metadata will not be set until the first row has been yielded or response with no rows
completes.

raises: `EarlyMetadataCallError` when called before the first row has been returned
or the iterator has completed with no rows in the response.

#### *property* table_name(*: Optional\[[str](https://docs.python.org/3/library/stdtypes.html#str)* )

Returns the table_name of the iterator.