public static final class ReadSession.TableReadOptions.Builder extends GeneratedMessageV3.Builder<ReadSession.TableReadOptions.Builder> implements ReadSession.TableReadOptionsOrBuilder
Options dictating how we read a table.
Protobuf type google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > ReadSession.TableReadOptions.BuilderImplements
ReadSession.TableReadOptionsOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
Methods
addAllSelectedFields(Iterable<String> values)
public ReadSession.TableReadOptions.Builder addAllSelectedFields(Iterable<String> values)
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;
Parameter | |
---|---|
Name | Description |
values | Iterable<String> The selectedFields to add. |
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder | This builder for chaining. |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public ReadSession.TableReadOptions.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
value | Object |
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder |
addSelectedFields(String value)
public ReadSession.TableReadOptions.Builder addSelectedFields(String value)
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;
Parameter | |
---|---|
Name | Description |
value | String The selectedFields to add. |
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder | This builder for chaining. |
addSelectedFieldsBytes(ByteString value)
public ReadSession.TableReadOptions.Builder addSelectedFieldsBytes(ByteString value)
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;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes of the selectedFields to add. |
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder | This builder for chaining. |
build()
public ReadSession.TableReadOptions build()
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions |
buildPartial()
public ReadSession.TableReadOptions buildPartial()
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions |
clear()
public ReadSession.TableReadOptions.Builder clear()
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder |
clearArrowSerializationOptions()
public ReadSession.TableReadOptions.Builder clearArrowSerializationOptions()
Optional. Options specific to the Apache Arrow output format.
.google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder |
clearAvroSerializationOptions()
public ReadSession.TableReadOptions.Builder clearAvroSerializationOptions()
Optional. Options specific to the Apache Avro output format
.google.cloud.bigquery.storage.v1.AvroSerializationOptions avro_serialization_options = 4 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder |
clearField(Descriptors.FieldDescriptor field)
public ReadSession.TableReadOptions.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field | FieldDescriptor |
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public ReadSession.TableReadOptions.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof | OneofDescriptor |
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder |
clearOutputFormatSerializationOptions()
public ReadSession.TableReadOptions.Builder clearOutputFormatSerializationOptions()
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder |
clearResponseCompressionCodec()
public ReadSession.TableReadOptions.Builder clearResponseCompressionCodec()
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];
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder | This builder for chaining. |
clearRowRestriction()
public ReadSession.TableReadOptions.Builder clearRowRestriction()
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;
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder | This builder for chaining. |
clearSamplePercentage()
public ReadSession.TableReadOptions.Builder clearSamplePercentage()
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];
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder | This builder for chaining. |
clearSelectedFields()
public ReadSession.TableReadOptions.Builder clearSelectedFields()
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;
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder | This builder for chaining. |
clone()
public ReadSession.TableReadOptions.Builder clone()
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder |
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];
Returns | |
---|---|
Type | Description |
ArrowSerializationOptions | The arrowSerializationOptions. |
getArrowSerializationOptionsBuilder()
public ArrowSerializationOptions.Builder getArrowSerializationOptionsBuilder()
Optional. Options specific to the Apache Arrow output format.
.google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
ArrowSerializationOptions.Builder |
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];
Returns | |
---|---|
Type | Description |
ArrowSerializationOptionsOrBuilder |
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];
Returns | |
---|---|
Type | Description |
AvroSerializationOptions | The avroSerializationOptions. |
getAvroSerializationOptionsBuilder()
public AvroSerializationOptions.Builder getAvroSerializationOptionsBuilder()
Optional. Options specific to the Apache Avro output format
.google.cloud.bigquery.storage.v1.AvroSerializationOptions avro_serialization_options = 4 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
AvroSerializationOptions.Builder |
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];
Returns | |
---|---|
Type | Description |
AvroSerializationOptionsOrBuilder |
getDefaultInstanceForType()
public ReadSession.TableReadOptions getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
getOutputFormatSerializationOptionsCase()
public ReadSession.TableReadOptions.OutputFormatSerializationOptionsCase getOutputFormatSerializationOptionsCase()
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.OutputFormatSerializationOptionsCase |
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];
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.ResponseCompressionCodec | The responseCompressionCodec. |
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];
Returns | |
---|---|
Type | Description |
int | The enum numeric value on the wire for responseCompressionCodec. |
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;
Returns | |
---|---|
Type | Description |
String | The rowRestriction. |
getRowRestrictionBytes()
public 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;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for rowRestriction. |
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];
Returns | |
---|---|
Type | Description |
double | The samplePercentage. |
getSelectedFields(int index)
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;
Parameter | |
---|---|
Name | Description |
index | int The index of the element to return. |
Returns | |
---|---|
Type | Description |
String | The selectedFields at the given index. |
getSelectedFieldsBytes(int index)
public 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;
Parameter | |
---|---|
Name | Description |
index | int The index of the value to return. |
Returns | |
---|---|
Type | Description |
ByteString | The bytes of the selectedFields at the given index. |
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;
Returns | |
---|---|
Type | Description |
int | The count of selectedFields. |
getSelectedFieldsList()
public 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;
Returns | |
---|---|
Type | Description |
ProtocolStringList | A list containing the selectedFields. |
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];
Returns | |
---|---|
Type | Description |
boolean | 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];
Returns | |
---|---|
Type | Description |
boolean | Whether the avroSerializationOptions field is set. |
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];
Returns | |
---|---|
Type | Description |
boolean | Whether the responseCompressionCodec 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];
Returns | |
---|---|
Type | Description |
boolean | Whether the samplePercentage field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeArrowSerializationOptions(ArrowSerializationOptions value)
public ReadSession.TableReadOptions.Builder mergeArrowSerializationOptions(ArrowSerializationOptions value)
Optional. Options specific to the Apache Arrow output format.
.google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
value | ArrowSerializationOptions |
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder |
mergeAvroSerializationOptions(AvroSerializationOptions value)
public ReadSession.TableReadOptions.Builder mergeAvroSerializationOptions(AvroSerializationOptions value)
Optional. Options specific to the Apache Avro output format
.google.cloud.bigquery.storage.v1.AvroSerializationOptions avro_serialization_options = 4 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
value | AvroSerializationOptions |
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder |
mergeFrom(ReadSession.TableReadOptions other)
public ReadSession.TableReadOptions.Builder mergeFrom(ReadSession.TableReadOptions other)
Parameter | |
---|---|
Name | Description |
other | ReadSession.TableReadOptions |
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public ReadSession.TableReadOptions.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public ReadSession.TableReadOptions.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other | Message |
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final ReadSession.TableReadOptions.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder |
setArrowSerializationOptions(ArrowSerializationOptions value)
public ReadSession.TableReadOptions.Builder setArrowSerializationOptions(ArrowSerializationOptions value)
Optional. Options specific to the Apache Arrow output format.
.google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
value | ArrowSerializationOptions |
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder |
setArrowSerializationOptions(ArrowSerializationOptions.Builder builderForValue)
public ReadSession.TableReadOptions.Builder setArrowSerializationOptions(ArrowSerializationOptions.Builder builderForValue)
Optional. Options specific to the Apache Arrow output format.
.google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
builderForValue | ArrowSerializationOptions.Builder |
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder |
setAvroSerializationOptions(AvroSerializationOptions value)
public ReadSession.TableReadOptions.Builder setAvroSerializationOptions(AvroSerializationOptions value)
Optional. Options specific to the Apache Avro output format
.google.cloud.bigquery.storage.v1.AvroSerializationOptions avro_serialization_options = 4 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
value | AvroSerializationOptions |
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder |
setAvroSerializationOptions(AvroSerializationOptions.Builder builderForValue)
public ReadSession.TableReadOptions.Builder setAvroSerializationOptions(AvroSerializationOptions.Builder builderForValue)
Optional. Options specific to the Apache Avro output format
.google.cloud.bigquery.storage.v1.AvroSerializationOptions avro_serialization_options = 4 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
builderForValue | AvroSerializationOptions.Builder |
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public ReadSession.TableReadOptions.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
value | Object |
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public ReadSession.TableReadOptions.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder |
setResponseCompressionCodec(ReadSession.TableReadOptions.ResponseCompressionCodec value)
public ReadSession.TableReadOptions.Builder setResponseCompressionCodec(ReadSession.TableReadOptions.ResponseCompressionCodec value)
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];
Parameter | |
---|---|
Name | Description |
value | ReadSession.TableReadOptions.ResponseCompressionCodec The responseCompressionCodec to set. |
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder | This builder for chaining. |
setResponseCompressionCodecValue(int value)
public ReadSession.TableReadOptions.Builder setResponseCompressionCodecValue(int value)
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];
Parameter | |
---|---|
Name | Description |
value | int The enum numeric value on the wire for responseCompressionCodec to set. |
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder | This builder for chaining. |
setRowRestriction(String value)
public ReadSession.TableReadOptions.Builder setRowRestriction(String value)
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;
Parameter | |
---|---|
Name | Description |
value | String The rowRestriction to set. |
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder | This builder for chaining. |
setRowRestrictionBytes(ByteString value)
public ReadSession.TableReadOptions.Builder setRowRestrictionBytes(ByteString value)
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;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for rowRestriction to set. |
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder | This builder for chaining. |
setSamplePercentage(double value)
public ReadSession.TableReadOptions.Builder setSamplePercentage(double value)
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];
Parameter | |
---|---|
Name | Description |
value | double The samplePercentage to set. |
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder | This builder for chaining. |
setSelectedFields(int index, String value)
public ReadSession.TableReadOptions.Builder setSelectedFields(int index, String value)
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;
Parameters | |
---|---|
Name | Description |
index | int The index to set the value at. |
value | String The selectedFields to set. |
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder | This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final ReadSession.TableReadOptions.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
Type | Description |
ReadSession.TableReadOptions.Builder |