# Class AppendRowsStream (2.39.0)

2.39.0 (latest) 2.38.0 2.37.0 2.36.2 2.35.0 2.34.0 2.33.1 2.32.0 2.31.0 2.30.0 2.29.1 2.28.0 2.27.0 2.26.0 2.25.0 2.24.0 2.23.0 2.22.0 2.21.0 2.20.0 2.19.1 2.18.1 2.17.0 2.16.2 2.15.0 2.14.2 2.13.2 2.12.0 2.11.0 2.10.1 2.9.1 2.8.0 2.7.0 2.6.3 2.5.0 2.4.0 2.3.0 2.2.1 2.1.0 2.0.1 1.1.2 1.0.0 0.8.0 0.7.0 0.6.0

    AppendRowsStream(
        client: google.cloud.bigquery_storage_v1beta2.services.big_query_write.client.BigQueryWriteClient,
        initial_request_template: google.cloud.bigquery_storage_v1beta2.types.storage.AppendRowsRequest,
        metadata: typing.Sequence[typing.Tuple[str, str]] = (),
    )

A manager object which can append rows to a stream.

## Properties

### is_active

bool: True if this manager is actively streaming.

Note that `False` does not indicate this is complete shut down,
just that it stopped getting new messages.

## Methods

### AppendRowsStream

    AppendRowsStream(
        client: google.cloud.bigquery_storage_v1beta2.services.big_query_write.client.BigQueryWriteClient,
        initial_request_template: google.cloud.bigquery_storage_v1beta2.types.storage.AppendRowsRequest,
        metadata: typing.Sequence[typing.Tuple[str, str]] = (),
    )

Construct a stream manager.

### add_close_callback

    add_close_callback(callback: typing.Callable)

Schedules a callable when the manager closes.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `callback` | `Callable` The method to call. |

### close

    close(reason: typing.Optional[Exception] = None)

Stop consuming messages and shutdown all helper threads.

This method is idempotent. Additional calls will have no effect.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `reason` | `typing.Optional[Exception]` The reason to close this. If `None`, this is considered an "intentional" shutdown. This is passed to the callbacks specified via `add_close_callback`. |

### send

    send(
        request: google.cloud.bigquery_storage_v1beta2.types.storage.AppendRowsRequest,
    ) -> google.cloud.bigquery_storage_v1beta2.writer.AppendRowsFuture

Send an append rows request to the open stream.