@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);
}
-
Class Summary Class Description AnnotationsProto AppendRowsRequest Request message for `AppendRows`.AppendRowsRequest.Builder Request message for `AppendRows`.AppendRowsRequest.ProtoData ProtoData contains the data rows and schema when constructing append requests.AppendRowsRequest.ProtoData.Builder ProtoData contains the data rows and schema when constructing append requests.AppendRowsResponse Response message for `AppendRows`.AppendRowsResponse.AppendResult AppendResult is returned for successful append requests.AppendRowsResponse.AppendResult.Builder AppendResult is returned for successful append requests.AppendRowsResponse.Builder Response message for `AppendRows`.ArrowProto ArrowRecordBatch Arrow RecordBatch.ArrowRecordBatch.Builder Arrow RecordBatch.ArrowSchema Arrow schema as specified in https://arrow.apache.org/docs/python/api/datatypes.html and serialized to bytes using IPC: https://arrow.apache.org/docs/format/Columnar.html#serialization-and-interprocess-communication-ipc See code samples on how this message can be deserialized.ArrowSchema.Builder Arrow schema as specified in https://arrow.apache.org/docs/python/api/datatypes.html and serialized to bytes using IPC: https://arrow.apache.org/docs/format/Columnar.html#serialization-and-interprocess-communication-ipc See code samples on how this message can be deserialized.ArrowSerializationOptions Contains options specific to Arrow Serialization.ArrowSerializationOptions.Builder Contains options specific to Arrow Serialization.AvroProto AvroRows Avro rows.AvroRows.Builder Avro rows.AvroSchema Avro schema.AvroSchema.Builder Avro schema.AvroSerializationOptions Contains options specific to Avro Serialization.AvroSerializationOptions.Builder Contains options specific to Avro Serialization.BaseBigQueryReadClient Service Description: BigQuery Read API.BaseBigQueryReadSettings Settings class to configure an instance ofBaseBigQueryReadClient
.BaseBigQueryReadSettings.Builder Builder for BaseBigQueryReadSettings.BatchCommitWriteStreamsRequest Request message for `BatchCommitWriteStreams`.BatchCommitWriteStreamsRequest.Builder Request message for `BatchCommitWriteStreams`.BatchCommitWriteStreamsResponse Response message for `BatchCommitWriteStreams`.BatchCommitWriteStreamsResponse.Builder Response message for `BatchCommitWriteStreams`.BigDecimalByteStringEncoder BigQueryReadClient Service Description: BigQuery Read API.BigQueryReadGrpc BigQuery Read API.BigQueryReadGrpc.BigQueryReadBlockingStub A stub to allow clients to do synchronous rpc calls to service BigQueryRead.BigQueryReadGrpc.BigQueryReadFutureStub A stub to allow clients to do ListenableFuture-style rpc calls to service BigQueryRead.BigQueryReadGrpc.BigQueryReadImplBase Base class for the server implementation of the service BigQueryRead.BigQueryReadGrpc.BigQueryReadStub A stub to allow clients to do asynchronous rpc calls to service BigQueryRead.BigQueryReadSettings Settings class to configure an instance ofBigQueryReadClient
.BigQueryReadSettings.Builder Builder for BigQueryReadSettings.BigQuerySchemaUtil BigQueryWriteClient Service Description: BigQuery Write API.BigQueryWriteGrpc BigQuery Write API.BigQueryWriteGrpc.BigQueryWriteBlockingStub A stub to allow clients to do synchronous rpc calls to service BigQueryWrite.BigQueryWriteGrpc.BigQueryWriteFutureStub A stub to allow clients to do ListenableFuture-style rpc calls to service BigQueryWrite.BigQueryWriteGrpc.BigQueryWriteImplBase Base class for the server implementation of the service BigQueryWrite.BigQueryWriteGrpc.BigQueryWriteStub A stub to allow clients to do asynchronous rpc calls to service BigQueryWrite.BigQueryWriteSettings Settings class to configure an instance ofBigQueryWriteClient
.BigQueryWriteSettings.Builder Builder for BigQueryWriteSettings.BQTableSchemaToProtoDescriptor Converts a BQ table schema to protobuf descriptor.CivilTimeEncoder 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.ConnectionWorkerPool Pool of connections to accept appends and distirbute to different connections.ConnectionWorkerPool.Settings Settings for connection pool.ConnectionWorkerPool.Settings.Builder Builder for the options to configConnectionWorkerPool
.CreateReadSessionRequest Request message for `CreateReadSession`.CreateReadSessionRequest.Builder Request message for `CreateReadSession`.CreateWriteStreamRequest Request message for `CreateWriteStream`.CreateWriteStreamRequest.Builder Request message for `CreateWriteStream`.Exceptions Exceptions for Storage Client Libraries.FinalizeWriteStreamRequest Request message for invoking `FinalizeWriteStream`.FinalizeWriteStreamRequest.Builder Request message for invoking `FinalizeWriteStream`.FinalizeWriteStreamResponse Response message for `FinalizeWriteStream`.FinalizeWriteStreamResponse.Builder Response message for `FinalizeWriteStream`.FlushRowsRequest Request message for `FlushRows`.FlushRowsRequest.Builder Request message for `FlushRows`.FlushRowsResponse Respond message for `FlushRows`.FlushRowsResponse.Builder Respond message for `FlushRows`.GetWriteStreamRequest Request message for `GetWriteStreamRequest`.GetWriteStreamRequest.Builder Request message for `GetWriteStreamRequest`.JsonStreamWriter A StreamWriter that can write JSON data (JSONObjects) to BigQuery tables.JsonStreamWriter.Builder JsonToProtoMessage Converts JSON data to Protobuf messages given the Protobuf descriptor and BigQuery table schema.ProjectName ProjectName.Builder Builder for projects/{project}.ProtoBufProto ProtoRows Protobuf typegoogle.cloud.bigquery.storage.v1.ProtoRows
ProtoRows.Builder Protobuf typegoogle.cloud.bigquery.storage.v1.ProtoRows
ProtoSchema ProtoSchema describes the schema of the serialized protocol buffer data rows.ProtoSchema.Builder ProtoSchema describes the schema of the serialized protocol buffer data rows.ProtoSchemaConverter ReadRowsRequest Request message for `ReadRows`.ReadRowsRequest.Builder Request message for `ReadRows`.ReadRowsResponse Response from calling `ReadRows` may include row data, progress and throttling information.ReadRowsResponse.Builder Response from calling `ReadRows` may include row data, progress and throttling information.ReadSession Information about the ReadSession.ReadSession.Builder Information about the ReadSession.ReadSession.TableModifiers Additional attributes when reading a table.ReadSession.TableModifiers.Builder Additional attributes when reading a table.ReadSession.TableReadOptions Options dictating how we read a table.ReadSession.TableReadOptions.Builder Options dictating how we read a table.ReadStream Information about a single stream that gets data out of the storage system.ReadStream.Builder Information about a single stream that gets data out of the storage system.ReadStreamName ReadStreamName.Builder Builder for projects/{project}/locations/{location}/sessions/{session}/streams/{stream}.RowError The message that presents row level error info in a request.RowError.Builder The message that presents row level error info in a request.SchemaAwareStreamWriter<T> A StreamWriter that can write data to BigQuery tables.SchemaAwareStreamWriter.Builder<T> SplitReadStreamRequest Request message for `SplitReadStream`.SplitReadStreamRequest.Builder Request message for `SplitReadStream`.SplitReadStreamResponse Response message for `SplitReadStream`.SplitReadStreamResponse.Builder Response message for `SplitReadStream`.StorageError Structured custom BigQuery Storage error message.StorageError.Builder Structured custom BigQuery Storage error message.StorageProto StreamProto StreamStats Estimated stream statistics for a given read Stream.StreamStats.Builder Estimated stream statistics for a given read Stream.StreamStats.Progress Protobuf typegoogle.cloud.bigquery.storage.v1.StreamStats.Progress
StreamStats.Progress.Builder Protobuf typegoogle.cloud.bigquery.storage.v1.StreamStats.Progress
StreamWriter A BigQuery Stream Writer that can be used to write data into BigQuery Table.StreamWriter.Builder A builder ofStreamWriter
s.StreamWriter.SingleConnectionOrConnectionPool When in single table mode, append directly to connectionWorker.TableFieldSchema TableFieldSchema defines a single field/column within a table schema.TableFieldSchema.Builder TableFieldSchema defines a single field/column within a table schema.TableName TableName.Builder Builder for projects/{project}/datasets/{dataset}/tables/{table}.TableProto TableSchema Schema of a table.TableSchema.Builder Schema of a table.ThrottleState Information on if the current connection is being throttled.ThrottleState.Builder Information on if the current connection is being throttled.WriteStream Information about a single stream that gets data inside the storage system.WriteStream.Builder Information about a single stream that gets data inside the storage system.WriteStreamName WriteStreamName.Builder Builder for projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}. -
Enum Summary Enum Description AppendRowsRequest.MissingValueInterpretation An enum to indicate how to interpret missing values of fields that are present in user schema but missing in rows.AppendRowsRequest.RowsCase AppendRowsResponse.ResponseCase ArrowSerializationOptions.CompressionCodec Compression codec's supported by Arrow.DataFormat Data format for input or output data.ReadRowsResponse.RowsCase ReadRowsResponse.SchemaCase ReadSession.SchemaCase ReadSession.TableReadOptions.OutputFormatSerializationOptionsCase RowError.RowErrorCode Error code for `RowError`.StorageError.StorageErrorCode Error code for `StorageError`.StreamWriter.SingleConnectionOrConnectionPool.Kind Kind of connection operation mode.TableFieldSchema.Mode Protobuf enumgoogle.cloud.bigquery.storage.v1.TableFieldSchema.Mode
TableFieldSchema.Type Protobuf enumgoogle.cloud.bigquery.storage.v1.TableFieldSchema.Type
WriteStream.Type Type enum of the stream.WriteStream.WriteMode Mode enum of the stream.WriteStreamView WriteStreamView is a view enum that controls what details about a write stream should be returned. -
Exception Summary Exception Description Exceptions.AppendSerializationError This exception is thrown fromSchemaAwareStreamWriter.append(Iterable)
when the client side Proto serialization fails.Exceptions.AppendSerializtionError This class has a typo in the name.Exceptions.DataHasUnknownFieldException Input data object has unknown field to the schema of the SchemaAwareStreamWriter.Exceptions.FieldParseError This exception is used internally to handle field level parsing errors.Exceptions.InflightBytesLimitExceededException Exceptions.InflightLimitExceededException If FlowController.LimitExceededBehavior is set to Block and inflight limit is exceeded, this exception will be thrown.Exceptions.InflightRequestsLimitExceededException Exceptions.JsonDataHasUnknownFieldException This class is replaced by a generic one.Exceptions.OffsetAlreadyExists Offset already exists.Exceptions.OffsetOutOfRange Offset out of range.Exceptions.SchemaMismatchedException There was a schema mismatch due to bigquery table with fewer fields than the input message.Exceptions.StorageException Main Storage Exception.Exceptions.StreamFinalizedException The write stream has already been finalized and will not accept further appends or flushes.Exceptions.StreamNotFound The stream is not found.Exceptions.StreamWriterClosedException This writer instance has either been closed by the user explicitly, or has encountered non-retriable errors.