Package com.google.cloud.bigquery.storage.v1
@Generated("by gapic-generator-java")
package com.google.cloud.bigquery.storage.v1
A client to BigQuery Storage API
The interfaces provided are listed below, along with usage samples.
======================= BaseBigQueryReadClient =======================
Service Description: BigQuery Read API.
The Read API can be used to read data from BigQuery.
Sample for BaseBigQueryReadClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigQueryReadClient baseBigQueryReadClient = BaseBigQueryReadClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
ReadSession readSession = ReadSession.newBuilder().build();
int maxStreamCount = 940837515;
ReadSession response =
baseBigQueryReadClient.createReadSession(parent, readSession, maxStreamCount);
}
======================= BigQueryWriteClient =======================
Service Description: 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
Sample for BigQueryWriteClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BigQueryWriteClient bigQueryWriteClient = BigQueryWriteClient.create()) {
TableName parent = TableName.of("[PROJECT]", "[DATASET]", "[TABLE]");
WriteStream writeStream = WriteStream.newBuilder().build();
WriteStream response = bigQueryWriteClient.createWriteStream(parent, writeStream);
}
-
ClassDescriptionService Description: BigQuery Read API.Settings class to configure an instance of
BaseBigQueryReadClient
.Builder for BaseBigQueryReadSettings.Service Description: BigQuery Read API.Settings class to configure an instance ofBigQueryReadClient
.Builder for BigQueryReadSettings.Service Description: BigQuery Write API.Settings class to configure an instance ofBigQueryWriteClient
.Builder for BigQueryWriteSettings.Converts a BQ table schema to protobuf descriptor.Ported from ZetaSQL CivilTimeEncoder Original code can be found at: https://github.com/google/zetasql/blob/master/java/com/google/zetasql/CivilTimeEncoder.java Encoder for TIME and DATETIME values, according to civil_time encoding.Pool of connections to accept appends and distirbute to different connections.Settings for connection pool.Builder for the options to configConnectionWorkerPool
.Exceptions for Storage Client Libraries.This exception is thrown fromSchemaAwareStreamWriter.append(Iterable)
when the client side Proto serialization fails.This class has a typo in the name.Input data object has unknown field to the schema of the SchemaAwareStreamWriter.This exception is used internally to handle field level parsing errors.If FlowController.LimitExceededBehavior is set to Block and inflight limit is exceeded, this exception will be thrown.This class is replaced by a generic one.Offset already exists.Offset out of range.There was a schema mismatch due to bigquery table with fewer fields than the input message.Main Storage Exception.The write stream has already been finalized and will not accept further appends or flushes.The stream is not found.This writer instance has either been closed by the user explicitly, or has encountered non-retriable errors.A StreamWriter that can write JSON data (JSONObjects) to BigQuery tables.Converts JSON data to Protobuf messages given the Protobuf descriptor and BigQuery table schema.A StreamWriter that can write data to BigQuery tables.A BigQuery Stream Writer that can be used to write data into BigQuery Table.A builder ofStreamWriter
s.When in single table mode, append directly to connectionWorker.Kind of connection operation mode.