Execute Query Iterator Async

class google.cloud.bigtable.data.execute_query.ExecuteQueryIteratorAsync(client: DataClientType, instance_id:str, app_profile_id: Optional[str], request_body: Dict[str, Any], prepare_metadata:Metadata, attempt_timeout:float |None, operation_timeout:float, req_metadata: Sequence[Tuple[str,str]] = (), retryable_excs: Sequence[type[Exception]] = ())

Bases: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 alwaysbe created via the client. The constructor is subject to change.

It isnot 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 witha 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

    • 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 )

Returns the app_profile_id of the iterator.

async close()

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

  • 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 closedor if metadata has not been set yet.

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

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

property table_name(: Optional[str )

Returns the table_name of the iterator.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-18 UTC.