public sealed class BigQueryWriteClientImpl : BigQueryWriteClientBigQueryWrite client wrapper implementation, for convenient use.
Namespace
Google.Cloud.BigQuery.Storage.V1Assembly
Google.Cloud.BigQuery.Storage.V1.dll
Remarks
BigQuery Write API.
The Write API can be used to write data to BigQuery.
For supplementary information about the Write API, see: https://cloud.google.com/bigquery/docs/write-api
Constructors
BigQueryWriteClientImpl(BigQueryWrite.BigQueryWriteClient, BigQueryWriteSettings)
public BigQueryWriteClientImpl(BigQueryWrite.BigQueryWriteClient grpcClient, BigQueryWriteSettings settings)Constructs a client wrapper for the BigQueryWrite service, with the specified gRPC client and settings.
| Parameters | |
|---|---|
| Name | Description |
grpcClient |
BigQueryWrite.BigQueryWriteClientThe underlying gRPC client. |
settings |
BigQueryWriteSettingsThe base BigQueryWriteSettings used within this client. |
Properties
GrpcClient
public override BigQueryWrite.BigQueryWriteClient GrpcClient { get; }The underlying gRPC BigQueryWrite client
| Property Value | |
|---|---|
| Type | Description |
BigQueryWrite.BigQueryWriteClient |
|
Methods
AppendRows(CallSettings, BidirectionalStreamingSettings)
public override BigQueryWriteClient.AppendRowsStream AppendRows(CallSettings callSettings = null, BidirectionalStreamingSettings streamingSettings = null)Appends data to the given stream.
If offset is specified, the offset is checked against the end of
stream. The server returns OUT_OF_RANGE in AppendRowsResponse if an
attempt is made to append to an offset beyond the current end of the stream
or ALREADY_EXISTS if user provides an offset that has already been
written to. User can retry with adjusted offset within the same RPC
connection. If offset is not specified, append happens at the end of the
stream.
The response contains an optional offset at which the append happened. No offset information will be returned for appends to a default stream.
Responses are received in the same order in which requests are sent. There will be one response for each successful inserted request. Responses may optionally embed error information if the originating AppendRequest was not successfully processed.
The specifics of when successfully appended data is made visible to the table are governed by the type of stream:
For COMMITTED streams (which includes the default stream), data is visible immediately upon successful append.
For BUFFERED streams, data is made visible via a subsequent
FlushRowsrpc which advances a cursor to a newer offset in the stream.For PENDING streams, data is not made visible until the stream itself is finalized (via the
FinalizeWriteStreamrpc), and the stream is explicitly committed via theBatchCommitWriteStreamsrpc.
| Parameters | |
|---|---|
| Name | Description |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
streamingSettings |
BidirectionalStreamingSettingsIf not null, applies streaming overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
BigQueryWriteClient.AppendRowsStream |
The client-server stream. |
BatchCommitWriteStreams(BatchCommitWriteStreamsRequest, CallSettings)
public override BatchCommitWriteStreamsResponse BatchCommitWriteStreams(BatchCommitWriteStreamsRequest request, CallSettings callSettings = null)Atomically commits a group of PENDING streams that belong to the same
parent table.
Streams must be finalized before commit and cannot be committed multiple times. Once a stream is committed, data in the stream becomes available for read operations.
| Parameters | |
|---|---|
| Name | Description |
request |
BatchCommitWriteStreamsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
BatchCommitWriteStreamsResponse |
The RPC response. |
BatchCommitWriteStreamsAsync(BatchCommitWriteStreamsRequest, CallSettings)
public override Task<BatchCommitWriteStreamsResponse> BatchCommitWriteStreamsAsync(BatchCommitWriteStreamsRequest request, CallSettings callSettings = null)Atomically commits a group of PENDING streams that belong to the same
parent table.
Streams must be finalized before commit and cannot be committed multiple times. Once a stream is committed, data in the stream becomes available for read operations.
| Parameters | |
|---|---|
| Name | Description |
request |
BatchCommitWriteStreamsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task<BatchCommitWriteStreamsResponse> |
A Task containing the RPC response. |
CreateWriteStream(CreateWriteStreamRequest, CallSettings)
public override WriteStream CreateWriteStream(CreateWriteStreamRequest request, CallSettings callSettings = null)Creates a write stream to the given table. Additionally, every table has a special stream named '_default' to which data can be written. This stream doesn't need to be created using CreateWriteStream. It is a stream that can be used simultaneously by any number of clients. Data written to this stream is considered committed as soon as an acknowledgement is received.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateWriteStreamRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
WriteStream |
The RPC response. |
CreateWriteStreamAsync(CreateWriteStreamRequest, CallSettings)
public override Task<WriteStream> CreateWriteStreamAsync(CreateWriteStreamRequest request, CallSettings callSettings = null)Creates a write stream to the given table. Additionally, every table has a special stream named '_default' to which data can be written. This stream doesn't need to be created using CreateWriteStream. It is a stream that can be used simultaneously by any number of clients. Data written to this stream is considered committed as soon as an acknowledgement is received.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateWriteStreamRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task<WriteStream> |
A Task containing the RPC response. |
FinalizeWriteStream(FinalizeWriteStreamRequest, CallSettings)
public override FinalizeWriteStreamResponse FinalizeWriteStream(FinalizeWriteStreamRequest request, CallSettings callSettings = null)Finalize a write stream so that no new data can be appended to the stream. Finalize is not supported on the '_default' stream.
| Parameters | |
|---|---|
| Name | Description |
request |
FinalizeWriteStreamRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
FinalizeWriteStreamResponse |
The RPC response. |
FinalizeWriteStreamAsync(FinalizeWriteStreamRequest, CallSettings)
public override Task<FinalizeWriteStreamResponse> FinalizeWriteStreamAsync(FinalizeWriteStreamRequest request, CallSettings callSettings = null)Finalize a write stream so that no new data can be appended to the stream. Finalize is not supported on the '_default' stream.
| Parameters | |
|---|---|
| Name | Description |
request |
FinalizeWriteStreamRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task<FinalizeWriteStreamResponse> |
A Task containing the RPC response. |
FlushRows(FlushRowsRequest, CallSettings)
public override FlushRowsResponse FlushRows(FlushRowsRequest request, CallSettings callSettings = null)Flushes rows to a BUFFERED stream.
If users are appending rows to BUFFERED stream, flush operation is required in order for the rows to become available for reading. A Flush operation flushes up to any previously flushed offset in a BUFFERED stream, to the offset specified in the request.
Flush is not supported on the _default stream, since it is not BUFFERED.
| Parameters | |
|---|---|
| Name | Description |
request |
FlushRowsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
FlushRowsResponse |
The RPC response. |
FlushRowsAsync(FlushRowsRequest, CallSettings)
public override Task<FlushRowsResponse> FlushRowsAsync(FlushRowsRequest request, CallSettings callSettings = null)Flushes rows to a BUFFERED stream.
If users are appending rows to BUFFERED stream, flush operation is required in order for the rows to become available for reading. A Flush operation flushes up to any previously flushed offset in a BUFFERED stream, to the offset specified in the request.
Flush is not supported on the _default stream, since it is not BUFFERED.
| Parameters | |
|---|---|
| Name | Description |
request |
FlushRowsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task<FlushRowsResponse> |
A Task containing the RPC response. |
GetWriteStream(GetWriteStreamRequest, CallSettings)
public override WriteStream GetWriteStream(GetWriteStreamRequest request, CallSettings callSettings = null)Gets information about a write stream.
| Parameters | |
|---|---|
| Name | Description |
request |
GetWriteStreamRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
WriteStream |
The RPC response. |
GetWriteStreamAsync(GetWriteStreamRequest, CallSettings)
public override Task<WriteStream> GetWriteStreamAsync(GetWriteStreamRequest request, CallSettings callSettings = null)Gets information about a write stream.
| Parameters | |
|---|---|
| Name | Description |
request |
GetWriteStreamRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task<WriteStream> |
A Task containing the RPC response. |