Class ReadSession.TableReadOptions

    • Field Detail

      • SELECTED_FIELDS_FIELD_NUMBER

        public static final int SELECTED_FIELDS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ROW_RESTRICTION_FIELD_NUMBER

        public static final int ROW_RESTRICTION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ARROW_SERIALIZATION_OPTIONS_FIELD_NUMBER

        public static final int ARROW_SERIALIZATION_OPTIONS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • AVRO_SERIALIZATION_OPTIONS_FIELD_NUMBER

        public static final int AVRO_SERIALIZATION_OPTIONS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • SAMPLE_PERCENTAGE_FIELD_NUMBER

        public static final int SAMPLE_PERCENTAGE_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

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

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

        public ReadSession.TableReadOptions.Builder 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
      • 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