Class JsonStreamWriter.Builder
- java.lang.Object
-
- com.google.cloud.bigquery.storage.v1.JsonStreamWriter.Builder
-
- Enclosing class:
- JsonStreamWriter
public static final class JsonStreamWriter.Builder extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonStreamWriterbuild()Builds JsonStreamWriterStringgetStreamName()Stream name on the builder.JsonStreamWriter.BuildersetChannelProvider(com.google.api.gax.rpc.TransportChannelProvider channelProvider)Setter for the underlying StreamWriter's TransportChannelProvider.JsonStreamWriter.BuildersetCompressorName(String compressorName)Sets the compression to use for the calls.JsonStreamWriter.BuildersetCredentialsProvider(com.google.api.gax.core.CredentialsProvider credentialsProvider)Setter for the underlying StreamWriter's CredentialsProvider.JsonStreamWriter.BuildersetDefaultMissingValueInterpretation(AppendRowsRequest.MissingValueInterpretation defaultMissingValueInterpretation)Sets the default missing value interpretation value if the column is not presented in the missing_value_interpretations map.JsonStreamWriter.BuildersetEnableConnectionPool(boolean enableConnectionPool)Enable multiplexing for this writer.JsonStreamWriter.BuildersetEndpoint(String endpoint)Setter for the underlying StreamWriter's Endpoint.JsonStreamWriter.BuildersetExecutorProvider(com.google.api.gax.core.ExecutorProvider executorProvider)Setter for the underlying StreamWriter's ExecutorProvider.JsonStreamWriter.BuildersetFlowControlSettings(com.google.api.gax.batching.FlowControlSettings flowControlSettings)Setter for the underlying StreamWriter's FlowControlSettings.JsonStreamWriter.BuildersetIgnoreUnknownFields(boolean ignoreUnknownFields)Setter for a ignoreUnkownFields, if true, unknown Json fields to BigQuery will be ignored instead of error out.JsonStreamWriter.BuildersetLocation(String location)Location of the table this stream writer is targeting.JsonStreamWriter.BuildersetReconnectAfter10M(boolean reconnectAfter10M)This parameter is not used.JsonStreamWriter.BuildersetTraceId(String traceId)Setter for a traceId to help identify traffic origin.
-
-
-
Method Detail
-
setChannelProvider
public JsonStreamWriter.Builder setChannelProvider(com.google.api.gax.rpc.TransportChannelProvider channelProvider)
Setter for the underlying StreamWriter's TransportChannelProvider.- Parameters:
channelProvider-- Returns:
- Builder
-
setCredentialsProvider
public JsonStreamWriter.Builder setCredentialsProvider(com.google.api.gax.core.CredentialsProvider credentialsProvider)
Setter for the underlying StreamWriter's CredentialsProvider.- Parameters:
credentialsProvider-- Returns:
- Builder
-
setExecutorProvider
public JsonStreamWriter.Builder setExecutorProvider(com.google.api.gax.core.ExecutorProvider executorProvider)
Setter for the underlying StreamWriter's ExecutorProvider.- Parameters:
executorProvider-- Returns:
-
setFlowControlSettings
public JsonStreamWriter.Builder setFlowControlSettings(com.google.api.gax.batching.FlowControlSettings flowControlSettings)
Setter for the underlying StreamWriter's FlowControlSettings.- Parameters:
flowControlSettings-- Returns:
- Builder
-
getStreamName
public String getStreamName()
Stream name on the builder.- Returns:
- Builder
-
setEndpoint
public JsonStreamWriter.Builder setEndpoint(String endpoint)
Setter for the underlying StreamWriter's Endpoint.- Parameters:
endpoint-- Returns:
- Builder
-
setTraceId
public JsonStreamWriter.Builder setTraceId(String traceId)
Setter for a traceId to help identify traffic origin.- Parameters:
traceId-- Returns:
- Builder
-
setIgnoreUnknownFields
public JsonStreamWriter.Builder setIgnoreUnknownFields(boolean ignoreUnknownFields)
Setter for a ignoreUnkownFields, if true, unknown Json fields to BigQuery will be ignored instead of error out.- Parameters:
ignoreUnknownFields-- Returns:
- Builder
-
setReconnectAfter10M
public JsonStreamWriter.Builder setReconnectAfter10M(boolean reconnectAfter10M)
This parameter is not used. It will be removed soon.
-
setEnableConnectionPool
public JsonStreamWriter.Builder setEnableConnectionPool(boolean enableConnectionPool)
Enable multiplexing for this writer. In multiplexing mode tables will share the same connection if possible until the connection is overwhelmed.- Parameters:
enableConnectionPool-- Returns:
- Builder
-
setLocation
public JsonStreamWriter.Builder setLocation(String location)
Location of the table this stream writer is targeting. Connection pools are shared by location.- Parameters:
location-- Returns:
- Builder
-
setCompressorName
public JsonStreamWriter.Builder setCompressorName(String compressorName)
Sets the compression to use for the calls. The compressor must be of type gzip.- Parameters:
compressorName-- Returns:
- Builder
-
setDefaultMissingValueInterpretation
public JsonStreamWriter.Builder setDefaultMissingValueInterpretation(AppendRowsRequest.MissingValueInterpretation defaultMissingValueInterpretation)
Sets the default missing value interpretation value if the column is not presented in the missing_value_interpretations map.If this value is set to `DEFAULT_VALUE`, we will always populate default value if the field is missing from json and default value is defined in the column.
If this value is set to `NULL_VALUE`, we will always not populate default value.
-
build
public JsonStreamWriter build() throws com.google.protobuf.Descriptors.DescriptorValidationException, IllegalArgumentException, IOException, InterruptedException
Builds JsonStreamWriter- Returns:
- JsonStreamWriter
- Throws:
com.google.protobuf.Descriptors.DescriptorValidationExceptionIllegalArgumentExceptionIOExceptionInterruptedException
-
-