Class BigtableDataClientAsync (2.26.0)

BigtableDataClientAsync(
    *,
    project: str | None = None,
    pool_size: int = 3,
    credentials: google.auth.credentials.Credentials | None = None,
    client_options: (
        dict[str, Any] | "google.api_core.client_options.ClientOptions" | None
    ) = None
)

Create a client instance for the Bigtable Data API

Client should be created within an async context (running event loop)

Methods

close

close(timeout: float = 2.0)

Cancel all background tasks

execute_query

execute_query(query: str, instance_id: str, *, parameters: Dict[str, ExecuteQueryValueType] | None = None, parameter_types: Dict[str, SqlType.Type] | None = None, app_profile_id: str | None = None, operation_timeout: float = 600, attempt_timeout: float | None = 20, retryable_errors: Sequence[type[Exception]] = (<class 'google.api_core.exceptions.DeadlineExceeded'>, <class 'google.api_core.exceptions.ServiceUnavailable'>, <class 'google.api_core.exceptions.Aborted'>)) -> ExecuteQueryIteratorAsync

Executes an SQL query on an instance. Returns an iterator to asynchronously stream back columns from selected rows.

Failed requests within operation_timeout will be retried based on the retryable_errors list until operation_timeout is reached.

Exceptions
Type Description
google.api_core.exceptions.DeadlineExceeded raised after operation timeout will be chained with a RetryExceptionGroup containing GoogleAPIError exceptions from any retries that failed
google.api_core.exceptions.GoogleAPIError raised if the request encounters an unrecoverable error
Returns
Type Description
ExecuteQueryIteratorAsync an asynchronous iterator that yields rows returned by the query

get_table

get_table(
    instance_id: str, table_id: str, *args, **kwargs
) -> google.cloud.bigtable.data._async.client.TableAsync

Returns a table instance for making data API requests. All arguments are passed directly to the TableAsync constructor.

Exceptions
Type Description
RuntimeError if called outside of an async context (no running event loop)
Returns
Type Description
TableAsync a table instance for making data API requests