Class BigtableDataClient (2.28.0)

BigtableDataClient(
    *,
    project: str | None = None,
    credentials: google.auth.credentials.Credentials | None = None,
    client_options: (
        dict[str, Any] | "google.api_core.client_options.ClientOptions" | None
    ) = None,
    **kwargs
)

Create a client instance for the Bigtable Data API

Methods

close

close(timeout: float | None = 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'>)) -> ExecuteQueryIterator

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
ExecuteQueryIterator 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._sync_autogen.client.Table

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

Exceptions
Type Description
None
Returns
Type Description
Table a table instance for making data API requests