public abstract class BigQueryWriteClient
Reference documentation and code samples for the Google BigQuery Storage v1 API class BigQueryWriteClient.
BigQueryWrite client wrapper, for convenient use.
Derived Types
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
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the BigQueryWrite service, which is a host of "bigquerystorage.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default BigQueryWrite scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default BigQueryWrite scopes are:
GrpcClient
public virtual BigQueryWrite.BigQueryWriteClient GrpcClient { get; }
The underlying gRPC BigQueryWrite client
Property Value | |
---|---|
Type | Description |
BigQueryWriteBigQueryWriteClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
Methods
AppendRows(CallSettings, BidirectionalStreamingSettings)
public virtual 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
FlushRows
rpc 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
FinalizeWriteStream
rpc), and the stream is explicitly committed via theBatchCommitWriteStreams
rpc.
Parameters | |
---|---|
Name | Description |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
streamingSettings |
BidirectionalStreamingSettings If not null, applies streaming overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BigQueryWriteClientAppendRowsStream |
The client-server stream. |
// Create client
BigQueryWriteClient bigQueryWriteClient = BigQueryWriteClient.Create();
// Initialize streaming call, retrieving the stream object
using BigQueryWriteClient.AppendRowsStream response = bigQueryWriteClient.AppendRows();
// Sending requests and retrieving responses can be arbitrarily interleaved
// Exact sequence will depend on client/server behavior
// Create task to do something with responses from server
Task responseHandlerTask = Task.Run(async () =>
{
// Note that C# 8 code can use await foreach
AsyncResponseStream<AppendRowsResponse> responseStream = response.GetResponseStream();
while (await responseStream.MoveNextAsync())
{
AppendRowsResponse responseItem = responseStream.Current;
// Do something with streamed response
}
// The response stream has completed
});
// Send requests to the server
bool done = false;
while (!done)
{
// Initialize a request
AppendRowsRequest request = new AppendRowsRequest
{
WriteStreamAsWriteStreamName = WriteStreamName.FromProjectDatasetTableStream("[PROJECT]", "[DATASET]", "[TABLE]", "[STREAM]"),
Offset = 0L,
ProtoRows = new AppendRowsRequest.Types.ProtoData(),
TraceId = "",
MissingValueInterpretations =
{
{
"",
AppendRowsRequest.Types.MissingValueInterpretation.Unspecified
},
},
DefaultMissingValueInterpretation = AppendRowsRequest.Types.MissingValueInterpretation.Unspecified,
};
// Stream a request to the server
await response.WriteAsync(request);
// Set "done" to true when sending requests is complete
}
// Complete writing requests to the stream
await response.WriteCompleteAsync();
// Await the response handler
// This will complete once all server responses have been processed
await responseHandlerTask;
BatchCommitWriteStreams(BatchCommitWriteStreamsRequest, CallSettings)
public virtual 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 |
BatchCommitWriteStreamsRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BatchCommitWriteStreamsResponse |
The RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = BigQueryWriteClient.Create();
// Initialize request argument(s)
BatchCommitWriteStreamsRequest request = new BatchCommitWriteStreamsRequest
{
ParentAsTableName = TableName.FromProjectDatasetTable("[PROJECT]", "[DATASET]", "[TABLE]"),
WriteStreams = { "", },
};
// Make the request
BatchCommitWriteStreamsResponse response = bigQueryWriteClient.BatchCommitWriteStreams(request);
BatchCommitWriteStreams(TableName, CallSettings)
public virtual BatchCommitWriteStreamsResponse BatchCommitWriteStreams(TableName parent, 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 |
parent |
TableName Required. Parent table that all the streams should belong to, in the form
of |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BatchCommitWriteStreamsResponse |
The RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = BigQueryWriteClient.Create();
// Initialize request argument(s)
TableName parent = TableName.FromProjectDatasetTable("[PROJECT]", "[DATASET]", "[TABLE]");
// Make the request
BatchCommitWriteStreamsResponse response = bigQueryWriteClient.BatchCommitWriteStreams(parent);
BatchCommitWriteStreams(string, CallSettings)
public virtual BatchCommitWriteStreamsResponse BatchCommitWriteStreams(string parent, 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 |
parent |
string Required. Parent table that all the streams should belong to, in the form
of |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BatchCommitWriteStreamsResponse |
The RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = BigQueryWriteClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/datasets/[DATASET]/tables/[TABLE]";
// Make the request
BatchCommitWriteStreamsResponse response = bigQueryWriteClient.BatchCommitWriteStreams(parent);
BatchCommitWriteStreamsAsync(BatchCommitWriteStreamsRequest, CallSettings)
public virtual 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 |
BatchCommitWriteStreamsRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskBatchCommitWriteStreamsResponse |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
BatchCommitWriteStreamsRequest request = new BatchCommitWriteStreamsRequest
{
ParentAsTableName = TableName.FromProjectDatasetTable("[PROJECT]", "[DATASET]", "[TABLE]"),
WriteStreams = { "", },
};
// Make the request
BatchCommitWriteStreamsResponse response = await bigQueryWriteClient.BatchCommitWriteStreamsAsync(request);
BatchCommitWriteStreamsAsync(BatchCommitWriteStreamsRequest, CancellationToken)
public virtual Task<BatchCommitWriteStreamsResponse> BatchCommitWriteStreamsAsync(BatchCommitWriteStreamsRequest request, CancellationToken cancellationToken)
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 |
BatchCommitWriteStreamsRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskBatchCommitWriteStreamsResponse |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
BatchCommitWriteStreamsRequest request = new BatchCommitWriteStreamsRequest
{
ParentAsTableName = TableName.FromProjectDatasetTable("[PROJECT]", "[DATASET]", "[TABLE]"),
WriteStreams = { "", },
};
// Make the request
BatchCommitWriteStreamsResponse response = await bigQueryWriteClient.BatchCommitWriteStreamsAsync(request);
BatchCommitWriteStreamsAsync(TableName, CallSettings)
public virtual Task<BatchCommitWriteStreamsResponse> BatchCommitWriteStreamsAsync(TableName parent, 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 |
parent |
TableName Required. Parent table that all the streams should belong to, in the form
of |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskBatchCommitWriteStreamsResponse |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
TableName parent = TableName.FromProjectDatasetTable("[PROJECT]", "[DATASET]", "[TABLE]");
// Make the request
BatchCommitWriteStreamsResponse response = await bigQueryWriteClient.BatchCommitWriteStreamsAsync(parent);
BatchCommitWriteStreamsAsync(TableName, CancellationToken)
public virtual Task<BatchCommitWriteStreamsResponse> BatchCommitWriteStreamsAsync(TableName parent, CancellationToken cancellationToken)
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 |
parent |
TableName Required. Parent table that all the streams should belong to, in the form
of |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskBatchCommitWriteStreamsResponse |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
TableName parent = TableName.FromProjectDatasetTable("[PROJECT]", "[DATASET]", "[TABLE]");
// Make the request
BatchCommitWriteStreamsResponse response = await bigQueryWriteClient.BatchCommitWriteStreamsAsync(parent);
BatchCommitWriteStreamsAsync(string, CallSettings)
public virtual Task<BatchCommitWriteStreamsResponse> BatchCommitWriteStreamsAsync(string parent, 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 |
parent |
string Required. Parent table that all the streams should belong to, in the form
of |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskBatchCommitWriteStreamsResponse |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/datasets/[DATASET]/tables/[TABLE]";
// Make the request
BatchCommitWriteStreamsResponse response = await bigQueryWriteClient.BatchCommitWriteStreamsAsync(parent);
BatchCommitWriteStreamsAsync(string, CancellationToken)
public virtual Task<BatchCommitWriteStreamsResponse> BatchCommitWriteStreamsAsync(string parent, CancellationToken cancellationToken)
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 |
parent |
string Required. Parent table that all the streams should belong to, in the form
of |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskBatchCommitWriteStreamsResponse |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/datasets/[DATASET]/tables/[TABLE]";
// Make the request
BatchCommitWriteStreamsResponse response = await bigQueryWriteClient.BatchCommitWriteStreamsAsync(parent);
Create()
public static BigQueryWriteClient Create()
Synchronously creates a BigQueryWriteClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use BigQueryWriteClientBuilder.
Returns | |
---|---|
Type | Description |
BigQueryWriteClient |
The created BigQueryWriteClient. |
CreateAsync(CancellationToken)
public static Task<BigQueryWriteClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a BigQueryWriteClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use BigQueryWriteClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken |
CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskBigQueryWriteClient |
The task representing the created BigQueryWriteClient. |
CreateWriteStream(CreateWriteStreamRequest, CallSettings)
public virtual 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 |
CreateWriteStreamRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
WriteStream |
The RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = BigQueryWriteClient.Create();
// Initialize request argument(s)
CreateWriteStreamRequest request = new CreateWriteStreamRequest
{
ParentAsTableName = TableName.FromProjectDatasetTable("[PROJECT]", "[DATASET]", "[TABLE]"),
WriteStream = new WriteStream(),
};
// Make the request
WriteStream response = bigQueryWriteClient.CreateWriteStream(request);
CreateWriteStream(TableName, WriteStream, CallSettings)
public virtual WriteStream CreateWriteStream(TableName parent, WriteStream writeStream, 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 |
parent |
TableName Required. Reference to the table to which the stream belongs, in the format
of |
writeStream |
WriteStream Required. Stream to be created. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
WriteStream |
The RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = BigQueryWriteClient.Create();
// Initialize request argument(s)
TableName parent = TableName.FromProjectDatasetTable("[PROJECT]", "[DATASET]", "[TABLE]");
WriteStream writeStream = new WriteStream();
// Make the request
WriteStream response = bigQueryWriteClient.CreateWriteStream(parent, writeStream);
CreateWriteStream(string, WriteStream, CallSettings)
public virtual WriteStream CreateWriteStream(string parent, WriteStream writeStream, 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 |
parent |
string Required. Reference to the table to which the stream belongs, in the format
of |
writeStream |
WriteStream Required. Stream to be created. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
WriteStream |
The RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = BigQueryWriteClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/datasets/[DATASET]/tables/[TABLE]";
WriteStream writeStream = new WriteStream();
// Make the request
WriteStream response = bigQueryWriteClient.CreateWriteStream(parent, writeStream);
CreateWriteStreamAsync(CreateWriteStreamRequest, CallSettings)
public virtual 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 |
CreateWriteStreamRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskWriteStream |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
CreateWriteStreamRequest request = new CreateWriteStreamRequest
{
ParentAsTableName = TableName.FromProjectDatasetTable("[PROJECT]", "[DATASET]", "[TABLE]"),
WriteStream = new WriteStream(),
};
// Make the request
WriteStream response = await bigQueryWriteClient.CreateWriteStreamAsync(request);
CreateWriteStreamAsync(CreateWriteStreamRequest, CancellationToken)
public virtual Task<WriteStream> CreateWriteStreamAsync(CreateWriteStreamRequest request, CancellationToken cancellationToken)
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 |
CreateWriteStreamRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskWriteStream |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
CreateWriteStreamRequest request = new CreateWriteStreamRequest
{
ParentAsTableName = TableName.FromProjectDatasetTable("[PROJECT]", "[DATASET]", "[TABLE]"),
WriteStream = new WriteStream(),
};
// Make the request
WriteStream response = await bigQueryWriteClient.CreateWriteStreamAsync(request);
CreateWriteStreamAsync(TableName, WriteStream, CallSettings)
public virtual Task<WriteStream> CreateWriteStreamAsync(TableName parent, WriteStream writeStream, 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 |
parent |
TableName Required. Reference to the table to which the stream belongs, in the format
of |
writeStream |
WriteStream Required. Stream to be created. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskWriteStream |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
TableName parent = TableName.FromProjectDatasetTable("[PROJECT]", "[DATASET]", "[TABLE]");
WriteStream writeStream = new WriteStream();
// Make the request
WriteStream response = await bigQueryWriteClient.CreateWriteStreamAsync(parent, writeStream);
CreateWriteStreamAsync(TableName, WriteStream, CancellationToken)
public virtual Task<WriteStream> CreateWriteStreamAsync(TableName parent, WriteStream writeStream, CancellationToken cancellationToken)
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 |
parent |
TableName Required. Reference to the table to which the stream belongs, in the format
of |
writeStream |
WriteStream Required. Stream to be created. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskWriteStream |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
TableName parent = TableName.FromProjectDatasetTable("[PROJECT]", "[DATASET]", "[TABLE]");
WriteStream writeStream = new WriteStream();
// Make the request
WriteStream response = await bigQueryWriteClient.CreateWriteStreamAsync(parent, writeStream);
CreateWriteStreamAsync(string, WriteStream, CallSettings)
public virtual Task<WriteStream> CreateWriteStreamAsync(string parent, WriteStream writeStream, 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 |
parent |
string Required. Reference to the table to which the stream belongs, in the format
of |
writeStream |
WriteStream Required. Stream to be created. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskWriteStream |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/datasets/[DATASET]/tables/[TABLE]";
WriteStream writeStream = new WriteStream();
// Make the request
WriteStream response = await bigQueryWriteClient.CreateWriteStreamAsync(parent, writeStream);
CreateWriteStreamAsync(string, WriteStream, CancellationToken)
public virtual Task<WriteStream> CreateWriteStreamAsync(string parent, WriteStream writeStream, CancellationToken cancellationToken)
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 |
parent |
string Required. Reference to the table to which the stream belongs, in the format
of |
writeStream |
WriteStream Required. Stream to be created. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskWriteStream |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/datasets/[DATASET]/tables/[TABLE]";
WriteStream writeStream = new WriteStream();
// Make the request
WriteStream response = await bigQueryWriteClient.CreateWriteStreamAsync(parent, writeStream);
FinalizeWriteStream(FinalizeWriteStreamRequest, CallSettings)
public virtual 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 |
FinalizeWriteStreamRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
FinalizeWriteStreamResponse |
The RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = BigQueryWriteClient.Create();
// Initialize request argument(s)
FinalizeWriteStreamRequest request = new FinalizeWriteStreamRequest
{
WriteStreamName = WriteStreamName.FromProjectDatasetTableStream("[PROJECT]", "[DATASET]", "[TABLE]", "[STREAM]"),
};
// Make the request
FinalizeWriteStreamResponse response = bigQueryWriteClient.FinalizeWriteStream(request);
FinalizeWriteStream(WriteStreamName, CallSettings)
public virtual FinalizeWriteStreamResponse FinalizeWriteStream(WriteStreamName name, 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 |
name |
WriteStreamName Required. Name of the stream to finalize, in the form of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
FinalizeWriteStreamResponse |
The RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = BigQueryWriteClient.Create();
// Initialize request argument(s)
WriteStreamName name = WriteStreamName.FromProjectDatasetTableStream("[PROJECT]", "[DATASET]", "[TABLE]", "[STREAM]");
// Make the request
FinalizeWriteStreamResponse response = bigQueryWriteClient.FinalizeWriteStream(name);
FinalizeWriteStream(string, CallSettings)
public virtual FinalizeWriteStreamResponse FinalizeWriteStream(string name, 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 |
name |
string Required. Name of the stream to finalize, in the form of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
FinalizeWriteStreamResponse |
The RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = BigQueryWriteClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/datasets/[DATASET]/tables/[TABLE]/streams/[STREAM]";
// Make the request
FinalizeWriteStreamResponse response = bigQueryWriteClient.FinalizeWriteStream(name);
FinalizeWriteStreamAsync(FinalizeWriteStreamRequest, CallSettings)
public virtual 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 |
FinalizeWriteStreamRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskFinalizeWriteStreamResponse |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
FinalizeWriteStreamRequest request = new FinalizeWriteStreamRequest
{
WriteStreamName = WriteStreamName.FromProjectDatasetTableStream("[PROJECT]", "[DATASET]", "[TABLE]", "[STREAM]"),
};
// Make the request
FinalizeWriteStreamResponse response = await bigQueryWriteClient.FinalizeWriteStreamAsync(request);
FinalizeWriteStreamAsync(FinalizeWriteStreamRequest, CancellationToken)
public virtual Task<FinalizeWriteStreamResponse> FinalizeWriteStreamAsync(FinalizeWriteStreamRequest request, CancellationToken cancellationToken)
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 |
FinalizeWriteStreamRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskFinalizeWriteStreamResponse |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
FinalizeWriteStreamRequest request = new FinalizeWriteStreamRequest
{
WriteStreamName = WriteStreamName.FromProjectDatasetTableStream("[PROJECT]", "[DATASET]", "[TABLE]", "[STREAM]"),
};
// Make the request
FinalizeWriteStreamResponse response = await bigQueryWriteClient.FinalizeWriteStreamAsync(request);
FinalizeWriteStreamAsync(WriteStreamName, CallSettings)
public virtual Task<FinalizeWriteStreamResponse> FinalizeWriteStreamAsync(WriteStreamName name, 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 |
name |
WriteStreamName Required. Name of the stream to finalize, in the form of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskFinalizeWriteStreamResponse |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
WriteStreamName name = WriteStreamName.FromProjectDatasetTableStream("[PROJECT]", "[DATASET]", "[TABLE]", "[STREAM]");
// Make the request
FinalizeWriteStreamResponse response = await bigQueryWriteClient.FinalizeWriteStreamAsync(name);
FinalizeWriteStreamAsync(WriteStreamName, CancellationToken)
public virtual Task<FinalizeWriteStreamResponse> FinalizeWriteStreamAsync(WriteStreamName name, CancellationToken cancellationToken)
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 |
name |
WriteStreamName Required. Name of the stream to finalize, in the form of
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskFinalizeWriteStreamResponse |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
WriteStreamName name = WriteStreamName.FromProjectDatasetTableStream("[PROJECT]", "[DATASET]", "[TABLE]", "[STREAM]");
// Make the request
FinalizeWriteStreamResponse response = await bigQueryWriteClient.FinalizeWriteStreamAsync(name);
FinalizeWriteStreamAsync(string, CallSettings)
public virtual Task<FinalizeWriteStreamResponse> FinalizeWriteStreamAsync(string name, 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 |
name |
string Required. Name of the stream to finalize, in the form of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskFinalizeWriteStreamResponse |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/datasets/[DATASET]/tables/[TABLE]/streams/[STREAM]";
// Make the request
FinalizeWriteStreamResponse response = await bigQueryWriteClient.FinalizeWriteStreamAsync(name);
FinalizeWriteStreamAsync(string, CancellationToken)
public virtual Task<FinalizeWriteStreamResponse> FinalizeWriteStreamAsync(string name, CancellationToken cancellationToken)
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 |
name |
string Required. Name of the stream to finalize, in the form of
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskFinalizeWriteStreamResponse |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/datasets/[DATASET]/tables/[TABLE]/streams/[STREAM]";
// Make the request
FinalizeWriteStreamResponse response = await bigQueryWriteClient.FinalizeWriteStreamAsync(name);
FlushRows(FlushRowsRequest, CallSettings)
public virtual 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 |
FlushRowsRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
FlushRowsResponse |
The RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = BigQueryWriteClient.Create();
// Initialize request argument(s)
FlushRowsRequest request = new FlushRowsRequest
{
WriteStreamAsWriteStreamName = WriteStreamName.FromProjectDatasetTableStream("[PROJECT]", "[DATASET]", "[TABLE]", "[STREAM]"),
Offset = 0L,
};
// Make the request
FlushRowsResponse response = bigQueryWriteClient.FlushRows(request);
FlushRows(WriteStreamName, CallSettings)
public virtual FlushRowsResponse FlushRows(WriteStreamName writeStream, 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 |
writeStream |
WriteStreamName Required. The stream that is the target of the flush operation. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
FlushRowsResponse |
The RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = BigQueryWriteClient.Create();
// Initialize request argument(s)
WriteStreamName writeStream = WriteStreamName.FromProjectDatasetTableStream("[PROJECT]", "[DATASET]", "[TABLE]", "[STREAM]");
// Make the request
FlushRowsResponse response = bigQueryWriteClient.FlushRows(writeStream);
FlushRows(string, CallSettings)
public virtual FlushRowsResponse FlushRows(string writeStream, 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 |
writeStream |
string Required. The stream that is the target of the flush operation. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
FlushRowsResponse |
The RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = BigQueryWriteClient.Create();
// Initialize request argument(s)
string writeStream = "projects/[PROJECT]/datasets/[DATASET]/tables/[TABLE]/streams/[STREAM]";
// Make the request
FlushRowsResponse response = bigQueryWriteClient.FlushRows(writeStream);
FlushRowsAsync(FlushRowsRequest, CallSettings)
public virtual 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 |
FlushRowsRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskFlushRowsResponse |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
FlushRowsRequest request = new FlushRowsRequest
{
WriteStreamAsWriteStreamName = WriteStreamName.FromProjectDatasetTableStream("[PROJECT]", "[DATASET]", "[TABLE]", "[STREAM]"),
Offset = 0L,
};
// Make the request
FlushRowsResponse response = await bigQueryWriteClient.FlushRowsAsync(request);
FlushRowsAsync(FlushRowsRequest, CancellationToken)
public virtual Task<FlushRowsResponse> FlushRowsAsync(FlushRowsRequest request, CancellationToken cancellationToken)
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 |
FlushRowsRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskFlushRowsResponse |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
FlushRowsRequest request = new FlushRowsRequest
{
WriteStreamAsWriteStreamName = WriteStreamName.FromProjectDatasetTableStream("[PROJECT]", "[DATASET]", "[TABLE]", "[STREAM]"),
Offset = 0L,
};
// Make the request
FlushRowsResponse response = await bigQueryWriteClient.FlushRowsAsync(request);
FlushRowsAsync(WriteStreamName, CallSettings)
public virtual Task<FlushRowsResponse> FlushRowsAsync(WriteStreamName writeStream, 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 |
writeStream |
WriteStreamName Required. The stream that is the target of the flush operation. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskFlushRowsResponse |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
WriteStreamName writeStream = WriteStreamName.FromProjectDatasetTableStream("[PROJECT]", "[DATASET]", "[TABLE]", "[STREAM]");
// Make the request
FlushRowsResponse response = await bigQueryWriteClient.FlushRowsAsync(writeStream);
FlushRowsAsync(WriteStreamName, CancellationToken)
public virtual Task<FlushRowsResponse> FlushRowsAsync(WriteStreamName writeStream, CancellationToken cancellationToken)
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 |
writeStream |
WriteStreamName Required. The stream that is the target of the flush operation. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskFlushRowsResponse |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
WriteStreamName writeStream = WriteStreamName.FromProjectDatasetTableStream("[PROJECT]", "[DATASET]", "[TABLE]", "[STREAM]");
// Make the request
FlushRowsResponse response = await bigQueryWriteClient.FlushRowsAsync(writeStream);
FlushRowsAsync(string, CallSettings)
public virtual Task<FlushRowsResponse> FlushRowsAsync(string writeStream, 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 |
writeStream |
string Required. The stream that is the target of the flush operation. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskFlushRowsResponse |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
string writeStream = "projects/[PROJECT]/datasets/[DATASET]/tables/[TABLE]/streams/[STREAM]";
// Make the request
FlushRowsResponse response = await bigQueryWriteClient.FlushRowsAsync(writeStream);
FlushRowsAsync(string, CancellationToken)
public virtual Task<FlushRowsResponse> FlushRowsAsync(string writeStream, CancellationToken cancellationToken)
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 |
writeStream |
string Required. The stream that is the target of the flush operation. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskFlushRowsResponse |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
string writeStream = "projects/[PROJECT]/datasets/[DATASET]/tables/[TABLE]/streams/[STREAM]";
// Make the request
FlushRowsResponse response = await bigQueryWriteClient.FlushRowsAsync(writeStream);
GetWriteStream(GetWriteStreamRequest, CallSettings)
public virtual WriteStream GetWriteStream(GetWriteStreamRequest request, CallSettings callSettings = null)
Gets information about a write stream.
Parameters | |
---|---|
Name | Description |
request |
GetWriteStreamRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
WriteStream |
The RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = BigQueryWriteClient.Create();
// Initialize request argument(s)
GetWriteStreamRequest request = new GetWriteStreamRequest
{
WriteStreamName = WriteStreamName.FromProjectDatasetTableStream("[PROJECT]", "[DATASET]", "[TABLE]", "[STREAM]"),
View = WriteStreamView.Unspecified,
};
// Make the request
WriteStream response = bigQueryWriteClient.GetWriteStream(request);
GetWriteStream(WriteStreamName, CallSettings)
public virtual WriteStream GetWriteStream(WriteStreamName name, CallSettings callSettings = null)
Gets information about a write stream.
Parameters | |
---|---|
Name | Description |
name |
WriteStreamName Required. Name of the stream to get, in the form of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
WriteStream |
The RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = BigQueryWriteClient.Create();
// Initialize request argument(s)
WriteStreamName name = WriteStreamName.FromProjectDatasetTableStream("[PROJECT]", "[DATASET]", "[TABLE]", "[STREAM]");
// Make the request
WriteStream response = bigQueryWriteClient.GetWriteStream(name);
GetWriteStream(string, CallSettings)
public virtual WriteStream GetWriteStream(string name, CallSettings callSettings = null)
Gets information about a write stream.
Parameters | |
---|---|
Name | Description |
name |
string Required. Name of the stream to get, in the form of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
WriteStream |
The RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = BigQueryWriteClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/datasets/[DATASET]/tables/[TABLE]/streams/[STREAM]";
// Make the request
WriteStream response = bigQueryWriteClient.GetWriteStream(name);
GetWriteStreamAsync(GetWriteStreamRequest, CallSettings)
public virtual Task<WriteStream> GetWriteStreamAsync(GetWriteStreamRequest request, CallSettings callSettings = null)
Gets information about a write stream.
Parameters | |
---|---|
Name | Description |
request |
GetWriteStreamRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskWriteStream |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
GetWriteStreamRequest request = new GetWriteStreamRequest
{
WriteStreamName = WriteStreamName.FromProjectDatasetTableStream("[PROJECT]", "[DATASET]", "[TABLE]", "[STREAM]"),
View = WriteStreamView.Unspecified,
};
// Make the request
WriteStream response = await bigQueryWriteClient.GetWriteStreamAsync(request);
GetWriteStreamAsync(GetWriteStreamRequest, CancellationToken)
public virtual Task<WriteStream> GetWriteStreamAsync(GetWriteStreamRequest request, CancellationToken cancellationToken)
Gets information about a write stream.
Parameters | |
---|---|
Name | Description |
request |
GetWriteStreamRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskWriteStream |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
GetWriteStreamRequest request = new GetWriteStreamRequest
{
WriteStreamName = WriteStreamName.FromProjectDatasetTableStream("[PROJECT]", "[DATASET]", "[TABLE]", "[STREAM]"),
View = WriteStreamView.Unspecified,
};
// Make the request
WriteStream response = await bigQueryWriteClient.GetWriteStreamAsync(request);
GetWriteStreamAsync(WriteStreamName, CallSettings)
public virtual Task<WriteStream> GetWriteStreamAsync(WriteStreamName name, CallSettings callSettings = null)
Gets information about a write stream.
Parameters | |
---|---|
Name | Description |
name |
WriteStreamName Required. Name of the stream to get, in the form of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskWriteStream |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
WriteStreamName name = WriteStreamName.FromProjectDatasetTableStream("[PROJECT]", "[DATASET]", "[TABLE]", "[STREAM]");
// Make the request
WriteStream response = await bigQueryWriteClient.GetWriteStreamAsync(name);
GetWriteStreamAsync(WriteStreamName, CancellationToken)
public virtual Task<WriteStream> GetWriteStreamAsync(WriteStreamName name, CancellationToken cancellationToken)
Gets information about a write stream.
Parameters | |
---|---|
Name | Description |
name |
WriteStreamName Required. Name of the stream to get, in the form of
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskWriteStream |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
WriteStreamName name = WriteStreamName.FromProjectDatasetTableStream("[PROJECT]", "[DATASET]", "[TABLE]", "[STREAM]");
// Make the request
WriteStream response = await bigQueryWriteClient.GetWriteStreamAsync(name);
GetWriteStreamAsync(string, CallSettings)
public virtual Task<WriteStream> GetWriteStreamAsync(string name, CallSettings callSettings = null)
Gets information about a write stream.
Parameters | |
---|---|
Name | Description |
name |
string Required. Name of the stream to get, in the form of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskWriteStream |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/datasets/[DATASET]/tables/[TABLE]/streams/[STREAM]";
// Make the request
WriteStream response = await bigQueryWriteClient.GetWriteStreamAsync(name);
GetWriteStreamAsync(string, CancellationToken)
public virtual Task<WriteStream> GetWriteStreamAsync(string name, CancellationToken cancellationToken)
Gets information about a write stream.
Parameters | |
---|---|
Name | Description |
name |
string Required. Name of the stream to get, in the form of
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskWriteStream |
A Task containing the RPC response. |
// Create client
BigQueryWriteClient bigQueryWriteClient = await BigQueryWriteClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/datasets/[DATASET]/tables/[TABLE]/streams/[STREAM]";
// Make the request
WriteStream response = await bigQueryWriteClient.GetWriteStreamAsync(name);
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
Task |
A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.