Package com.google.cloud.bigquery.storage.v1beta1 (2.45.0)

A client to BigQuery Storage API

The interfaces provided are listed below, along with usage samples.

BaseBigQueryStorageClient

Service Description: BigQuery storage API.

The BigQuery storage API can be used to read data stored in BigQuery.

The v1beta1 API is not yet officially deprecated, and will go through a full deprecation cycle (https://cloud.google.com/products#product-launch-stages) before the service is turned down. However, new code should use the v1 API going forward.

Sample for BaseBigQueryStorageClient:


 // 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 (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
   TableReferenceProto.TableReference tableReference =
       TableReferenceProto.TableReference.newBuilder().build();
   ProjectName parent = ProjectName.of("[PROJECT]");
   int requestedStreams = 1017221410;
   Storage.ReadSession response =
       baseBigQueryStorageClient.createReadSession(tableReference, parent, requestedStreams);
 }
 

Classes

ArrowProto

ArrowProto.ArrowRecordBatch

Arrow RecordBatch.

Protobuf type google.cloud.bigquery.storage.v1beta1.ArrowRecordBatch

ArrowProto.ArrowRecordBatch.Builder

Arrow RecordBatch.

Protobuf type google.cloud.bigquery.storage.v1beta1.ArrowRecordBatch

ArrowProto.ArrowSchema

Arrow schema.

Protobuf type google.cloud.bigquery.storage.v1beta1.ArrowSchema

ArrowProto.ArrowSchema.Builder

Arrow schema.

Protobuf type google.cloud.bigquery.storage.v1beta1.ArrowSchema

AvroProto

AvroProto.AvroRows

Avro rows.

Protobuf type google.cloud.bigquery.storage.v1beta1.AvroRows

AvroProto.AvroRows.Builder

Avro rows.

Protobuf type google.cloud.bigquery.storage.v1beta1.AvroRows

AvroProto.AvroSchema

Avro schema.

Protobuf type google.cloud.bigquery.storage.v1beta1.AvroSchema

AvroProto.AvroSchema.Builder

Avro schema.

Protobuf type google.cloud.bigquery.storage.v1beta1.AvroSchema

BaseBigQueryStorageClient

Service Description: BigQuery storage API.

The BigQuery storage API can be used to read data stored in BigQuery.

The v1beta1 API is not yet officially deprecated, and will go through a full deprecation cycle (https://cloud.google.com/products#product-launch-stages) before the service is turned down. However, new code should use the v1 API going forward.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // 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 (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
   TableReferenceProto.TableReference tableReference =
       TableReferenceProto.TableReference.newBuilder().build();
   ProjectName parent = ProjectName.of("[PROJECT]");
   int requestedStreams = 1017221410;
   Storage.ReadSession response =
       baseBigQueryStorageClient.createReadSession(tableReference, parent, requestedStreams);
 }
 

Note: close() needs to be called on the BaseBigQueryStorageClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of BaseBigQueryStorageSettings to create(). For example:

To customize credentials:


 // 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
 BaseBigQueryStorageSettings baseBigQueryStorageSettings =
     BaseBigQueryStorageSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 BaseBigQueryStorageClient baseBigQueryStorageClient =
     BaseBigQueryStorageClient.create(baseBigQueryStorageSettings);
 

To customize the endpoint:


 // 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
 BaseBigQueryStorageSettings baseBigQueryStorageSettings =
     BaseBigQueryStorageSettings.newBuilder().setEndpoint(myEndpoint).build();
 BaseBigQueryStorageClient baseBigQueryStorageClient =
     BaseBigQueryStorageClient.create(baseBigQueryStorageSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

BaseBigQueryStorageSettings

Settings class to configure an instance of BaseBigQueryStorageClient.

The default instance has everything set to sensible defaults:

  • The default service address (bigquerystorage.googleapis.com) and default port (443) are used.
  • Credentials are acquired automatically through Application Default Credentials.
  • Retries are configured for idempotent methods but not for non-idempotent methods.

The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.

For example, to set the total timeout of createReadSession to 30 seconds:


 // 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
 BaseBigQueryStorageSettings.Builder baseBigQueryStorageSettingsBuilder =
     BaseBigQueryStorageSettings.newBuilder();
 baseBigQueryStorageSettingsBuilder
     .createReadSessionSettings()
     .setRetrySettings(
         baseBigQueryStorageSettingsBuilder
             .createReadSessionSettings()
             .getRetrySettings()
             .toBuilder()
             .setTotalTimeout(Duration.ofSeconds(30))
             .build());
 BaseBigQueryStorageSettings baseBigQueryStorageSettings =
     baseBigQueryStorageSettingsBuilder.build();
 

BaseBigQueryStorageSettings.Builder

Builder for BaseBigQueryStorageSettings.

BigQueryStorageClient

Service Description: BigQuery storage API.

The BigQuery storage API can be used to read data stored in BigQuery.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:

 
 try (BigQueryStorageClient bigQueryStorageClient = BigQueryStorageClient.create()) {
   TableReference tableReference = TableReference.newBuilder().build();
   String parent = "";
   int requestedStreams = 0;
   ReadSession response = bigQueryStorageClient.createReadSession(tableReference, parent, requestedStreams);
 }
 
 

Note: close() needs to be called on the bigQueryStorageClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of BigQueryStorageSettings to create(). For example:

To customize credentials:

 
 BigQueryStorageSettings bigQueryStorageSettings =
     BigQueryStorageSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 BigQueryStorageClient bigQueryStorageClient =
     BigQueryStorageClient.create(bigQueryStorageSettings);
 
 

To customize the endpoint:

 
 BigQueryStorageSettings bigQueryStorageSettings =
     BigQueryStorageSettings.newBuilder().setEndpoint(myEndpoint).build();
 BigQueryStorageClient bigQueryStorageClient =
     BigQueryStorageClient.create(bigQueryStorageSettings);
 
 

BigQueryStorageGrpc

BigQuery storage API. The BigQuery storage API can be used to read data stored in BigQuery. The v1beta1 API is not yet officially deprecated, and will go through a full deprecation cycle (https://cloud.google.com/products#product-launch-stages) before the service is turned down. However, new code should use the v1 API going forward.

BigQueryStorageGrpc.BigQueryStorageBlockingStub

A stub to allow clients to do synchronous rpc calls to service BigQueryStorage.

BigQuery storage API. The BigQuery storage API can be used to read data stored in BigQuery. The v1beta1 API is not yet officially deprecated, and will go through a full deprecation cycle (https://cloud.google.com/products#product-launch-stages) before the service is turned down. However, new code should use the v1 API going forward.

BigQueryStorageGrpc.BigQueryStorageFutureStub

A stub to allow clients to do ListenableFuture-style rpc calls to service BigQueryStorage.

BigQuery storage API. The BigQuery storage API can be used to read data stored in BigQuery. The v1beta1 API is not yet officially deprecated, and will go through a full deprecation cycle (https://cloud.google.com/products#product-launch-stages) before the service is turned down. However, new code should use the v1 API going forward.

BigQueryStorageGrpc.BigQueryStorageImplBase

Base class for the server implementation of the service BigQueryStorage.

BigQuery storage API. The BigQuery storage API can be used to read data stored in BigQuery. The v1beta1 API is not yet officially deprecated, and will go through a full deprecation cycle (https://cloud.google.com/products#product-launch-stages) before the service is turned down. However, new code should use the v1 API going forward.

BigQueryStorageGrpc.BigQueryStorageStub

A stub to allow clients to do asynchronous rpc calls to service BigQueryStorage.

BigQuery storage API. The BigQuery storage API can be used to read data stored in BigQuery. The v1beta1 API is not yet officially deprecated, and will go through a full deprecation cycle (https://cloud.google.com/products#product-launch-stages) before the service is turned down. However, new code should use the v1 API going forward.

BigQueryStorageSettings

Settings class to configure an instance of BigQueryStorageClient.

The default instance has everything set to sensible defaults:

  • The default service address (bigquerystorage.googleapis.com) and default port (443) are used.
  • Credentials are acquired automatically through Application Default Credentials.
  • Retries are configured for idempotent methods but not for non-idempotent methods.

The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object. For example, to set the total timeout of createReadSession to 30 seconds:

 
 BigQueryStorageSettings.Builder settingsBuilder = BaseBigQueryStorageSettings.newBuilder();
 settingsBuilder.createReadSessionSettings().getRetrySettings().toBuilder()
     .setTotalTimeout(Duration.ofSeconds(30));
 BaseBigQueryStorageSettings settings = settingsBuilder.build();
 
 

BigQueryStorageSettings.Builder

Builder for BigQueryStorageSettings.

ProjectName

ProjectName.Builder

Builder for projects/{project}.

ReadOptions

ReadOptions.TableReadOptions

Options dictating how we read a table.

Protobuf type google.cloud.bigquery.storage.v1beta1.TableReadOptions

ReadOptions.TableReadOptions.Builder

Options dictating how we read a table.

Protobuf type google.cloud.bigquery.storage.v1beta1.TableReadOptions

Storage

Storage.BatchCreateReadSessionStreamsRequest

Information needed to request additional streams for an established read session.

Protobuf type google.cloud.bigquery.storage.v1beta1.BatchCreateReadSessionStreamsRequest

Storage.BatchCreateReadSessionStreamsRequest.Builder

Information needed to request additional streams for an established read session.

Protobuf type google.cloud.bigquery.storage.v1beta1.BatchCreateReadSessionStreamsRequest

Storage.BatchCreateReadSessionStreamsResponse

The response from BatchCreateReadSessionStreams returns the stream identifiers for the newly created streams.

Protobuf type google.cloud.bigquery.storage.v1beta1.BatchCreateReadSessionStreamsResponse

Storage.BatchCreateReadSessionStreamsResponse.Builder

The response from BatchCreateReadSessionStreams returns the stream identifiers for the newly created streams.

Protobuf type google.cloud.bigquery.storage.v1beta1.BatchCreateReadSessionStreamsResponse

Storage.CreateReadSessionRequest

Creates a new read session, which may include additional options such as requested parallelism, projection filters and constraints.

Protobuf type google.cloud.bigquery.storage.v1beta1.CreateReadSessionRequest

Storage.CreateReadSessionRequest.Builder

Creates a new read session, which may include additional options such as requested parallelism, projection filters and constraints.

Protobuf type google.cloud.bigquery.storage.v1beta1.CreateReadSessionRequest

Storage.FinalizeStreamRequest

Request information for invoking FinalizeStream.

Protobuf type google.cloud.bigquery.storage.v1beta1.FinalizeStreamRequest

Storage.FinalizeStreamRequest.Builder

Request information for invoking FinalizeStream.

Protobuf type google.cloud.bigquery.storage.v1beta1.FinalizeStreamRequest

Storage.Progress

Protobuf type google.cloud.bigquery.storage.v1beta1.Progress

Storage.Progress.Builder

Protobuf type google.cloud.bigquery.storage.v1beta1.Progress

Storage.ReadRowsRequest

Requesting row data via ReadRows must provide Stream position information.

Protobuf type google.cloud.bigquery.storage.v1beta1.ReadRowsRequest

Storage.ReadRowsRequest.Builder

Requesting row data via ReadRows must provide Stream position information.

Protobuf type google.cloud.bigquery.storage.v1beta1.ReadRowsRequest

Storage.ReadRowsResponse

Response from calling ReadRows may include row data, progress and throttling information.

Protobuf type google.cloud.bigquery.storage.v1beta1.ReadRowsResponse

Storage.ReadRowsResponse.Builder

Response from calling ReadRows may include row data, progress and throttling information.

Protobuf type google.cloud.bigquery.storage.v1beta1.ReadRowsResponse

Storage.ReadSession

Information returned from a CreateReadSession request.

Protobuf type google.cloud.bigquery.storage.v1beta1.ReadSession

Storage.ReadSession.Builder

Information returned from a CreateReadSession request.

Protobuf type google.cloud.bigquery.storage.v1beta1.ReadSession

Storage.SplitReadStreamRequest

Request information for SplitReadStream.

Protobuf type google.cloud.bigquery.storage.v1beta1.SplitReadStreamRequest

Storage.SplitReadStreamRequest.Builder

Request information for SplitReadStream.

Protobuf type google.cloud.bigquery.storage.v1beta1.SplitReadStreamRequest

Storage.SplitReadStreamResponse

Response from SplitReadStream.

Protobuf type google.cloud.bigquery.storage.v1beta1.SplitReadStreamResponse

Storage.SplitReadStreamResponse.Builder

Response from SplitReadStream.

Protobuf type google.cloud.bigquery.storage.v1beta1.SplitReadStreamResponse

Storage.Stream

Information about a single data stream within a read session.

Protobuf type google.cloud.bigquery.storage.v1beta1.Stream

Storage.Stream.Builder

Information about a single data stream within a read session.

Protobuf type google.cloud.bigquery.storage.v1beta1.Stream

Storage.StreamPosition

Expresses a point within a given stream using an offset position.

Protobuf type google.cloud.bigquery.storage.v1beta1.StreamPosition

Storage.StreamPosition.Builder

Expresses a point within a given stream using an offset position.

Protobuf type google.cloud.bigquery.storage.v1beta1.StreamPosition

Storage.StreamStatus

Progress information for a given Stream.

Protobuf type google.cloud.bigquery.storage.v1beta1.StreamStatus

Storage.StreamStatus.Builder

Progress information for a given Stream.

Protobuf type google.cloud.bigquery.storage.v1beta1.StreamStatus

Storage.ThrottleStatus

Information on if the current connection is being throttled.

Protobuf type google.cloud.bigquery.storage.v1beta1.ThrottleStatus

Storage.ThrottleStatus.Builder

Information on if the current connection is being throttled.

Protobuf type google.cloud.bigquery.storage.v1beta1.ThrottleStatus

TableReferenceProto

TableReferenceProto.TableModifiers

All fields in this message optional.

Protobuf type google.cloud.bigquery.storage.v1beta1.TableModifiers

TableReferenceProto.TableModifiers.Builder

All fields in this message optional.

Protobuf type google.cloud.bigquery.storage.v1beta1.TableModifiers

TableReferenceProto.TableReference

Table reference that includes just the 3 strings needed to identify a table.

Protobuf type google.cloud.bigquery.storage.v1beta1.TableReference

TableReferenceProto.TableReference.Builder

Table reference that includes just the 3 strings needed to identify a table.

Protobuf type google.cloud.bigquery.storage.v1beta1.TableReference

Interfaces

ArrowProto.ArrowRecordBatchOrBuilder

ArrowProto.ArrowSchemaOrBuilder

AvroProto.AvroRowsOrBuilder

AvroProto.AvroSchemaOrBuilder

BigQueryStorageGrpc.AsyncService

BigQuery storage API. The BigQuery storage API can be used to read data stored in BigQuery. The v1beta1 API is not yet officially deprecated, and will go through a full deprecation cycle (https://cloud.google.com/products#product-launch-stages) before the service is turned down. However, new code should use the v1 API going forward.

BigQueryStorageSettings.RetryAttemptListener

ReadOptions.TableReadOptionsOrBuilder

Storage.BatchCreateReadSessionStreamsRequestOrBuilder

Storage.BatchCreateReadSessionStreamsResponseOrBuilder

Storage.CreateReadSessionRequestOrBuilder

Storage.FinalizeStreamRequestOrBuilder

Storage.ProgressOrBuilder

Storage.ReadRowsRequestOrBuilder

Storage.ReadRowsResponseOrBuilder

Storage.ReadSessionOrBuilder

Storage.SplitReadStreamRequestOrBuilder

Storage.SplitReadStreamResponseOrBuilder

Storage.StreamOrBuilder

Storage.StreamPositionOrBuilder

Storage.StreamStatusOrBuilder

Storage.ThrottleStatusOrBuilder

TableReferenceProto.TableModifiersOrBuilder

TableReferenceProto.TableReferenceOrBuilder

Enums

Storage.DataFormat

Data format for input or output data.

Protobuf enum google.cloud.bigquery.storage.v1beta1.DataFormat

Storage.ReadRowsResponse.RowsCase

Storage.ReadRowsResponse.SchemaCase

Storage.ReadSession.SchemaCase

Storage.ShardingStrategy

Strategy for distributing data among multiple streams in a read session.

Protobuf enum google.cloud.bigquery.storage.v1beta1.ShardingStrategy