Class SchemaAwareStreamWriter.Builder<T>

java.lang.Object
com.google.cloud.bigquery.storage.v1.SchemaAwareStreamWriter.Builder<T>
Enclosing class:
SchemaAwareStreamWriter<T>

public static final class SchemaAwareStreamWriter.Builder<T> extends Object
  • Method Details

    • setChannelProvider

      public SchemaAwareStreamWriter.Builder<T> setChannelProvider(com.google.api.gax.rpc.TransportChannelProvider channelProvider)
      Setter for the underlying StreamWriter's TransportChannelProvider.
      Parameters:
      channelProvider -
      Returns:
      Builder
    • setCredentialsProvider

      public SchemaAwareStreamWriter.Builder<T> setCredentialsProvider(com.google.api.gax.core.CredentialsProvider credentialsProvider)
      Setter for the underlying StreamWriter's CredentialsProvider.
      Parameters:
      credentialsProvider -
      Returns:
      Builder
    • setExecutorProvider

      public SchemaAwareStreamWriter.Builder<T> setExecutorProvider(com.google.api.gax.core.ExecutorProvider executorProvider)
      Setter for the underlying StreamWriter's ExecutorProvider.
      Parameters:
      executorProvider -
      Returns:
    • setFlowControlSettings

      public SchemaAwareStreamWriter.Builder<T> 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 SchemaAwareStreamWriter.Builder<T> setEndpoint(String endpoint)
      Setter for the underlying StreamWriter's Endpoint.
      Parameters:
      endpoint -
      Returns:
      Builder
    • setTraceId

      public SchemaAwareStreamWriter.Builder<T> setTraceId(String traceId)
      Setter for a traceId to help identify traffic origin.
      Parameters:
      traceId -
      Returns:
      Builder
    • setTraceIdBase

      public SchemaAwareStreamWriter.Builder<T> setTraceIdBase(String traceIdBase)
      Setter for a traceIdBase to help identify traffic origin.
      Parameters:
      traceIdBase -
      Returns:
      Builder
    • setIgnoreUnknownFields

      public SchemaAwareStreamWriter.Builder<T> setIgnoreUnknownFields(boolean ignoreUnknownFields)
      Setter for a ignoreUnknownFields, if true, unknown fields to BigQuery will be ignored instead of error out.
      Parameters:
      ignoreUnknownFields -
      Returns:
      Builder
    • setEnableConnectionPool

      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.
      Parameters:
      enableConnectionPool -
      Returns:
      Builder
    • setLocation

      public SchemaAwareStreamWriter.Builder<T> setLocation(String location)
      Location of the table this stream writer is targeting. Connection pools are shared by location.
      Parameters:
      location -
      Returns:
      Builder
    • setCompressorName

      public SchemaAwareStreamWriter.Builder<T> setCompressorName(String compressorName)
      Sets the compression to use for the calls. The compressor must be of type gzip.
      Parameters:
      compressorName -
      Returns:
      Builder
    • setDefaultMissingValueInterpretation

      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.
    • build

      public SchemaAwareStreamWriter<T> build() throws com.google.protobuf.Descriptors.DescriptorValidationException, IllegalArgumentException, IOException, InterruptedException
      Builds SchemaAwareStreamWriter
      Returns:
      SchemaAwareStreamWriter
      Throws:
      com.google.protobuf.Descriptors.DescriptorValidationException
      IllegalArgumentException
      IOException
      InterruptedException