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

    BigtableDataClientAsync(
        *,
        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

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

## Properties

### api_endpoint

Return the API endpoint used by the client instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `str` | The API endpoint used by the client instance. |

### universe_domain

Return the universe domain used by the client instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `str` | The universe domain used by the client instance. |

## 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,
        view_parameters: dict[str, str] | None = None,
        app_profile_id: str | None = None,
        operation_timeout: float = 600,
        attempt_timeout: float | None = 20,
        retryable_errors: Sequence[type[Exception]] = (
            google.api_core.exceptions.DeadlineExceeded,
            google.api_core.exceptions.ServiceUnavailable,
            google.api_core.exceptions.Aborted,
        ),
        prepare_operation_timeout: float = 60,
        prepare_attempt_timeout: float | None = 20,
        prepare_retryable_errors: Sequence[type[Exception]] = (
            google.api_core.exceptions.DeadlineExceeded,
            google.api_core.exceptions.ServiceUnavailable,
        ),
        column_info: dict[str, Message | EnumTypeWrapper] | None = None
    ) -> 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.

Note that this makes two requests, one to `PrepareQuery` and one to `ExecuteQuery`.
These have separate retry configurations. `ExecuteQuery` is where the bulk of the
work happens.

| **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 |
| `https://docs-0cloud-0google-0com.linkedin.net.nz/python/docs/reference/bigtable/latest/google.cloud.bigtable.data.exceptions.ParameterTypeInferenceFailed` | Raised if a parameter is passed without an explicit type, and the type cannot be infered |
| `google.protobuf.message.DecodeError` | raised if the deserialization of a PROTO/ENUM value fails. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `ExecuteQueryIteratorAsync` | an asynchronous iterator that yields rows returned by the query |

### get_authorized_view

    get_authorized_view(
        instance_id: str, table_id: str, authorized_view_id: str, *args, **kwargs
    ) -> google.cloud.bigtable.data._async.client.AuthorizedViewAsync

Returns an authorized view instance for making data API requests. All arguments are passed
directly to the AuthorizedViewAsync constructor.

Must be created within an async context (running event loop)

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `RuntimeError` | if called outside of an async context (no running event loop) |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AuthorizedViewAsync` | a table instance for making data API requests |

### get_materialized_view

    get_materialized_view(
        instance_id: str, materialized_view_id: str, *args, **kwargs
    ) -> google.cloud.bigtable.data._async.client.MaterializedViewAsync

Returns a materialized view instance for making read requests. All arguments are passed
directly to the MaterializedViewAsync constructor.

Must be created within an async context (running event loop)

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `RuntimeError` | if called outside of an async context (no running event loop) |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `MaterializedViewAsync` | a materialized view instance for making read requests |

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

Must be created within an async context (running event loop)

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