Class SchemaAwareStreamWriter.Builder<T> (3.2.0)

public static final class SchemaAwareStreamWriter.Builder<T>

Inheritance

java.lang.Object > SchemaAwareStreamWriter.Builder<T>

Type Parameter

NameDescription
T

Methods

build()

public SchemaAwareStreamWriter<T> build()

Builds SchemaAwareStreamWriter

Returns
TypeDescription
SchemaAwareStreamWriter<T>

SchemaAwareStreamWriter

Exceptions
TypeDescription
DescriptorValidationException
IllegalArgumentException
IOException
InterruptedException

getStreamName()

public String getStreamName()

Stream name on the builder.

Returns
TypeDescription
String

Builder

setChannelProvider(TransportChannelProvider channelProvider)

public SchemaAwareStreamWriter.Builder<T> setChannelProvider(TransportChannelProvider channelProvider)

Setter for the underlying StreamWriter's TransportChannelProvider.

Parameter
NameDescription
channelProviderTransportChannelProvider
Returns
TypeDescription
Builder<T>

Builder

setCompressorName(String compressorName)

public SchemaAwareStreamWriter.Builder<T> setCompressorName(String compressorName)

Sets the compression to use for the calls. The compressor must be of type gzip.

Parameter
NameDescription
compressorNameString
Returns
TypeDescription
Builder<T>

Builder

setCredentialsProvider(CredentialsProvider credentialsProvider)

public SchemaAwareStreamWriter.Builder<T> setCredentialsProvider(CredentialsProvider credentialsProvider)

Setter for the underlying StreamWriter's CredentialsProvider.

Parameter
NameDescription
credentialsProviderCredentialsProvider
Returns
TypeDescription
Builder<T>

Builder

setDefaultMissingValueInterpretation(AppendRowsRequest.MissingValueInterpretation defaultMissingValueInterpretation)

public SchemaAwareStreamWriter.Builder setDefaultMissingValueInterpretation(AppendRowsRequest.MissingValueInterpretation defaultMissingValueInterpretation)

Sets the default missing value interpretation value if the column is not presented in the missing_value_interpretations map.

Parameter
NameDescription
defaultMissingValueInterpretationAppendRowsRequest.MissingValueInterpretation
Returns
TypeDescription
SchemaAwareStreamWriter.Builder<T>

setEnableConnectionPool(boolean enableConnectionPool)

public SchemaAwareStreamWriter.Builder<T> setEnableConnectionPool(boolean enableConnectionPool)

Enable multiplexing for this writer. In multiplexing mode tables will share the same connection if possible until the connection is overwhelmed. This feature is still under development, please contact write api team before using.

Parameter
NameDescription
enableConnectionPoolboolean
Returns
TypeDescription
Builder<T>

Builder

setEndpoint(String endpoint)

public SchemaAwareStreamWriter.Builder<T> setEndpoint(String endpoint)

Setter for the underlying StreamWriter's Endpoint.

Parameter
NameDescription
endpointString
Returns
TypeDescription
Builder<T>

Builder

setExecutorProvider(ExecutorProvider executorProvider)

public SchemaAwareStreamWriter.Builder<T> setExecutorProvider(ExecutorProvider executorProvider)

Setter for the underlying StreamWriter's ExecutorProvider.

Parameter
NameDescription
executorProviderExecutorProvider
Returns
TypeDescription
Builder<T>

setFlowControlSettings(FlowControlSettings flowControlSettings)

public SchemaAwareStreamWriter.Builder<T> setFlowControlSettings(FlowControlSettings flowControlSettings)

Setter for the underlying StreamWriter's FlowControlSettings.

Parameter
NameDescription
flowControlSettingsFlowControlSettings
Returns
TypeDescription
Builder<T>

Builder

setIgnoreUnknownFields(boolean ignoreUnknownFields)

public SchemaAwareStreamWriter.Builder<T> setIgnoreUnknownFields(boolean ignoreUnknownFields)

Setter for a ignoreUnknownFields, if true, unknown fields to BigQuery will be ignored instead of error out.

Parameter
NameDescription
ignoreUnknownFieldsboolean
Returns
TypeDescription
Builder<T>

Builder

setLocation(String location)

public SchemaAwareStreamWriter.Builder<T> setLocation(String location)

Location of the table this stream writer is targeting. Connection pools are shared by location.

Parameter
NameDescription
locationString
Returns
TypeDescription
Builder<T>

Builder

setRetrySettings(RetrySettings retrySettings)

public SchemaAwareStreamWriter.Builder setRetrySettings(RetrySettings retrySettings)

Sets the RetrySettings to use for in-stream error retry.

Parameter
NameDescription
retrySettingsRetrySettings
Returns
TypeDescription
SchemaAwareStreamWriter.Builder<T>

Builder

setTraceId(String traceId)

public SchemaAwareStreamWriter.Builder<T> setTraceId(String traceId)

Setter for a traceId to help identify traffic origin.

Parameter
NameDescription
traceIdString
Returns
TypeDescription
Builder<T>

Builder