Class AppendRowsStream (2.16.2)

Stay organized with collections Save and categorize content based on your preferences.
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: Sequence[Tuple[str, str]] = (),
)

A manager object which can append rows to a stream.

Inheritance

builtins.object > AppendRowsStream

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: Sequence[Tuple[str, str]] = (),
)

Construct a stream manager.

add_close_callback

add_close_callback(callback: Callable)

Schedules a callable when the manager closes.

Parameter
NameDescription
callback Callable

The method to call.

close

close(reason: Optional[Exception] = None)

Stop consuming messages and shutdown all helper threads.

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

send

send(
    request: google.cloud.bigquery_storage_v1beta2.types.storage.AppendRowsRequest,
)

Send an append rows request to the open stream.