Class ReadSession.TableReadOptions

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions
All Implemented Interfaces:
ReadSession.TableReadOptionsOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
Enclosing class:
ReadSession

public static final class ReadSession.TableReadOptions extends com.google.protobuf.GeneratedMessageV3 implements ReadSession.TableReadOptionsOrBuilder
 Options dictating how we read a table.
 
Protobuf type google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions
See Also:
  • Field Details

    • SELECTED_FIELDS_FIELD_NUMBER

      public static final int SELECTED_FIELDS_FIELD_NUMBER
      See Also:
    • ROW_RESTRICTION_FIELD_NUMBER

      public static final int ROW_RESTRICTION_FIELD_NUMBER
      See Also:
    • ARROW_SERIALIZATION_OPTIONS_FIELD_NUMBER

      public static final int ARROW_SERIALIZATION_OPTIONS_FIELD_NUMBER
      See Also:
    • AVRO_SERIALIZATION_OPTIONS_FIELD_NUMBER

      public static final int AVRO_SERIALIZATION_OPTIONS_FIELD_NUMBER
      See Also:
    • SAMPLE_PERCENTAGE_FIELD_NUMBER

      public static final int SAMPLE_PERCENTAGE_FIELD_NUMBER
      See Also:
    • RESPONSE_COMPRESSION_CODEC_FIELD_NUMBER

      public static final int RESPONSE_COMPRESSION_CODEC_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • getOutputFormatSerializationOptionsCase

      public ReadSession.TableReadOptions.OutputFormatSerializationOptionsCase getOutputFormatSerializationOptionsCase()
      Specified by:
      getOutputFormatSerializationOptionsCase in interface ReadSession.TableReadOptionsOrBuilder
    • getSelectedFieldsList

      public com.google.protobuf.ProtocolStringList getSelectedFieldsList()
       Optional. The names of the fields in the table to be returned. If no
       field names are specified, then all fields in the table are returned.
      
       Nested fields -- the child elements of a STRUCT field -- can be selected
       individually using their fully-qualified names, and will be returned as
       record fields containing only the selected nested fields. If a STRUCT
       field is specified in the selected fields list, all of the child elements
       will be returned.
      
       As an example, consider a table with the following schema:
      
         {
             "name": "struct_field",
             "type": "RECORD",
             "mode": "NULLABLE",
             "fields": [
                 {
                     "name": "string_field1",
                     "type": "STRING",
       .              "mode": "NULLABLE"
                 },
                 {
                     "name": "string_field2",
                     "type": "STRING",
                     "mode": "NULLABLE"
                 }
             ]
         }
      
       Specifying "struct_field" in the selected fields list will result in a
       read session schema with the following logical structure:
      
         struct_field {
             string_field1
             string_field2
         }
      
       Specifying "struct_field.string_field1" in the selected fields list will
       result in a read session schema with the following logical structure:
      
         struct_field {
             string_field1
         }
      
       The order of the fields in the read session schema is derived from the
       table schema and does not correspond to the order in which the fields are
       specified in this list.
       
      repeated string selected_fields = 1;
      Specified by:
      getSelectedFieldsList in interface ReadSession.TableReadOptionsOrBuilder
      Returns:
      A list containing the selectedFields.
    • getSelectedFieldsCount

      public int getSelectedFieldsCount()
       Optional. The names of the fields in the table to be returned. If no
       field names are specified, then all fields in the table are returned.
      
       Nested fields -- the child elements of a STRUCT field -- can be selected
       individually using their fully-qualified names, and will be returned as
       record fields containing only the selected nested fields. If a STRUCT
       field is specified in the selected fields list, all of the child elements
       will be returned.
      
       As an example, consider a table with the following schema:
      
         {
             "name": "struct_field",
             "type": "RECORD",
             "mode": "NULLABLE",
             "fields": [
                 {
                     "name": "string_field1",
                     "type": "STRING",
       .              "mode": "NULLABLE"
                 },
                 {
                     "name": "string_field2",
                     "type": "STRING",
                     "mode": "NULLABLE"
                 }
             ]
         }
      
       Specifying "struct_field" in the selected fields list will result in a
       read session schema with the following logical structure:
      
         struct_field {
             string_field1
             string_field2
         }
      
       Specifying "struct_field.string_field1" in the selected fields list will
       result in a read session schema with the following logical structure:
      
         struct_field {
             string_field1
         }
      
       The order of the fields in the read session schema is derived from the
       table schema and does not correspond to the order in which the fields are
       specified in this list.
       
      repeated string selected_fields = 1;
      Specified by:
      getSelectedFieldsCount in interface ReadSession.TableReadOptionsOrBuilder
      Returns:
      The count of selectedFields.
    • getSelectedFields

      public String getSelectedFields(int index)
       Optional. The names of the fields in the table to be returned. If no
       field names are specified, then all fields in the table are returned.
      
       Nested fields -- the child elements of a STRUCT field -- can be selected
       individually using their fully-qualified names, and will be returned as
       record fields containing only the selected nested fields. If a STRUCT
       field is specified in the selected fields list, all of the child elements
       will be returned.
      
       As an example, consider a table with the following schema:
      
         {
             "name": "struct_field",
             "type": "RECORD",
             "mode": "NULLABLE",
             "fields": [
                 {
                     "name": "string_field1",
                     "type": "STRING",
       .              "mode": "NULLABLE"
                 },
                 {
                     "name": "string_field2",
                     "type": "STRING",
                     "mode": "NULLABLE"
                 }
             ]
         }
      
       Specifying "struct_field" in the selected fields list will result in a
       read session schema with the following logical structure:
      
         struct_field {
             string_field1
             string_field2
         }
      
       Specifying "struct_field.string_field1" in the selected fields list will
       result in a read session schema with the following logical structure:
      
         struct_field {
             string_field1
         }
      
       The order of the fields in the read session schema is derived from the
       table schema and does not correspond to the order in which the fields are
       specified in this list.
       
      repeated string selected_fields = 1;
      Specified by:
      getSelectedFields in interface ReadSession.TableReadOptionsOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The selectedFields at the given index.
    • getSelectedFieldsBytes

      public com.google.protobuf.ByteString getSelectedFieldsBytes(int index)
       Optional. The names of the fields in the table to be returned. If no
       field names are specified, then all fields in the table are returned.
      
       Nested fields -- the child elements of a STRUCT field -- can be selected
       individually using their fully-qualified names, and will be returned as
       record fields containing only the selected nested fields. If a STRUCT
       field is specified in the selected fields list, all of the child elements
       will be returned.
      
       As an example, consider a table with the following schema:
      
         {
             "name": "struct_field",
             "type": "RECORD",
             "mode": "NULLABLE",
             "fields": [
                 {
                     "name": "string_field1",
                     "type": "STRING",
       .              "mode": "NULLABLE"
                 },
                 {
                     "name": "string_field2",
                     "type": "STRING",
                     "mode": "NULLABLE"
                 }
             ]
         }
      
       Specifying "struct_field" in the selected fields list will result in a
       read session schema with the following logical structure:
      
         struct_field {
             string_field1
             string_field2
         }
      
       Specifying "struct_field.string_field1" in the selected fields list will
       result in a read session schema with the following logical structure:
      
         struct_field {
             string_field1
         }
      
       The order of the fields in the read session schema is derived from the
       table schema and does not correspond to the order in which the fields are
       specified in this list.
       
      repeated string selected_fields = 1;
      Specified by:
      getSelectedFieldsBytes in interface ReadSession.TableReadOptionsOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the selectedFields at the given index.
    • getRowRestriction

      public String getRowRestriction()
       SQL text filtering statement, similar to a WHERE clause in a query.
       Aggregates are not supported.
      
       Examples: "int_field > 5"
                 "date_field = CAST('2014-9-27' as DATE)"
                 "nullable_field is not NULL"
                 "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))"
                 "numeric_field BETWEEN 1.0 AND 5.0"
      
       Restricted to a maximum length for 1 MB.
       
      string row_restriction = 2;
      Specified by:
      getRowRestriction in interface ReadSession.TableReadOptionsOrBuilder
      Returns:
      The rowRestriction.
    • getRowRestrictionBytes

      public com.google.protobuf.ByteString getRowRestrictionBytes()
       SQL text filtering statement, similar to a WHERE clause in a query.
       Aggregates are not supported.
      
       Examples: "int_field > 5"
                 "date_field = CAST('2014-9-27' as DATE)"
                 "nullable_field is not NULL"
                 "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))"
                 "numeric_field BETWEEN 1.0 AND 5.0"
      
       Restricted to a maximum length for 1 MB.
       
      string row_restriction = 2;
      Specified by:
      getRowRestrictionBytes in interface ReadSession.TableReadOptionsOrBuilder
      Returns:
      The bytes for rowRestriction.
    • hasArrowSerializationOptions

      public boolean hasArrowSerializationOptions()
       Optional. Options specific to the Apache Arrow output format.
       
      .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasArrowSerializationOptions in interface ReadSession.TableReadOptionsOrBuilder
      Returns:
      Whether the arrowSerializationOptions field is set.
    • getArrowSerializationOptions

      public ArrowSerializationOptions getArrowSerializationOptions()
       Optional. Options specific to the Apache Arrow output format.
       
      .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getArrowSerializationOptions in interface ReadSession.TableReadOptionsOrBuilder
      Returns:
      The arrowSerializationOptions.
    • getArrowSerializationOptionsOrBuilder

      public ArrowSerializationOptionsOrBuilder getArrowSerializationOptionsOrBuilder()
       Optional. Options specific to the Apache Arrow output format.
       
      .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getArrowSerializationOptionsOrBuilder in interface ReadSession.TableReadOptionsOrBuilder
    • hasAvroSerializationOptions

      public boolean hasAvroSerializationOptions()
       Optional. Options specific to the Apache Avro output format
       
      .google.cloud.bigquery.storage.v1.AvroSerializationOptions avro_serialization_options = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasAvroSerializationOptions in interface ReadSession.TableReadOptionsOrBuilder
      Returns:
      Whether the avroSerializationOptions field is set.
    • getAvroSerializationOptions

      public AvroSerializationOptions getAvroSerializationOptions()
       Optional. Options specific to the Apache Avro output format
       
      .google.cloud.bigquery.storage.v1.AvroSerializationOptions avro_serialization_options = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAvroSerializationOptions in interface ReadSession.TableReadOptionsOrBuilder
      Returns:
      The avroSerializationOptions.
    • getAvroSerializationOptionsOrBuilder

      public AvroSerializationOptionsOrBuilder getAvroSerializationOptionsOrBuilder()
       Optional. Options specific to the Apache Avro output format
       
      .google.cloud.bigquery.storage.v1.AvroSerializationOptions avro_serialization_options = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAvroSerializationOptionsOrBuilder in interface ReadSession.TableReadOptionsOrBuilder
    • hasSamplePercentage

      public boolean hasSamplePercentage()
       Optional. Specifies a table sampling percentage. Specifically, the query
       planner will use TABLESAMPLE SYSTEM (sample_percentage PERCENT). The
       sampling percentage is applied at the data block granularity. It will
       randomly choose for each data block whether to read the rows in that data
       block. For more details, see
       https://cloud.google.com/bigquery/docs/table-sampling)
       
      optional double sample_percentage = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasSamplePercentage in interface ReadSession.TableReadOptionsOrBuilder
      Returns:
      Whether the samplePercentage field is set.
    • getSamplePercentage

      public double getSamplePercentage()
       Optional. Specifies a table sampling percentage. Specifically, the query
       planner will use TABLESAMPLE SYSTEM (sample_percentage PERCENT). The
       sampling percentage is applied at the data block granularity. It will
       randomly choose for each data block whether to read the rows in that data
       block. For more details, see
       https://cloud.google.com/bigquery/docs/table-sampling)
       
      optional double sample_percentage = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSamplePercentage in interface ReadSession.TableReadOptionsOrBuilder
      Returns:
      The samplePercentage.
    • hasResponseCompressionCodec

      public boolean hasResponseCompressionCodec()
       Optional. Set response_compression_codec when creating a read session to
       enable application-level compression of ReadRows responses.
       
      optional .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodec response_compression_codec = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasResponseCompressionCodec in interface ReadSession.TableReadOptionsOrBuilder
      Returns:
      Whether the responseCompressionCodec field is set.
    • getResponseCompressionCodecValue

      public int getResponseCompressionCodecValue()
       Optional. Set response_compression_codec when creating a read session to
       enable application-level compression of ReadRows responses.
       
      optional .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodec response_compression_codec = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getResponseCompressionCodecValue in interface ReadSession.TableReadOptionsOrBuilder
      Returns:
      The enum numeric value on the wire for responseCompressionCodec.
    • getResponseCompressionCodec

      public ReadSession.TableReadOptions.ResponseCompressionCodec getResponseCompressionCodec()
       Optional. Set response_compression_codec when creating a read session to
       enable application-level compression of ReadRows responses.
       
      optional .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodec response_compression_codec = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getResponseCompressionCodec in interface ReadSession.TableReadOptionsOrBuilder
      Returns:
      The responseCompressionCodec.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static ReadSession.TableReadOptions parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ReadSession.TableReadOptions parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ReadSession.TableReadOptions parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ReadSession.TableReadOptions parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ReadSession.TableReadOptions parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ReadSession.TableReadOptions parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ReadSession.TableReadOptions parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ReadSession.TableReadOptions parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ReadSession.TableReadOptions parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ReadSession.TableReadOptions parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ReadSession.TableReadOptions parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ReadSession.TableReadOptions parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public ReadSession.TableReadOptions.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static ReadSession.TableReadOptions.Builder newBuilder()
    • newBuilder

    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected ReadSession.TableReadOptions.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static ReadSession.TableReadOptions getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<ReadSession.TableReadOptions> parser()
    • getParserForType

      public com.google.protobuf.Parser<ReadSession.TableReadOptions> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public ReadSession.TableReadOptions getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder