Class ReadOptions.TableReadOptions.Builder (2.44.1)

public static final class ReadOptions.TableReadOptions.Builder extends GeneratedMessageV3.Builder<ReadOptions.TableReadOptions.Builder> implements ReadOptions.TableReadOptionsOrBuilder

Options dictating how we read a table.

Protobuf type google.cloud.bigquery.storage.v1beta1.TableReadOptions

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllSelectedFields(Iterable<String> values)

public ReadOptions.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
NameDescription
valuesIterable<String>

The selectedFields to add.

Returns
TypeDescription
ReadOptions.TableReadOptions.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ReadOptions.TableReadOptions.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ReadOptions.TableReadOptions.Builder
Overrides

addSelectedFields(String value)

public ReadOptions.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
NameDescription
valueString

The selectedFields to add.

Returns
TypeDescription
ReadOptions.TableReadOptions.Builder

This builder for chaining.

addSelectedFieldsBytes(ByteString value)

public ReadOptions.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
NameDescription
valueByteString

The bytes of the selectedFields to add.

Returns
TypeDescription
ReadOptions.TableReadOptions.Builder

This builder for chaining.

build()

public ReadOptions.TableReadOptions build()
Returns
TypeDescription
ReadOptions.TableReadOptions

buildPartial()

public ReadOptions.TableReadOptions buildPartial()
Returns
TypeDescription
ReadOptions.TableReadOptions

clear()

public ReadOptions.TableReadOptions.Builder clear()
Returns
TypeDescription
ReadOptions.TableReadOptions.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public ReadOptions.TableReadOptions.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
ReadOptions.TableReadOptions.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public ReadOptions.TableReadOptions.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
ReadOptions.TableReadOptions.Builder
Overrides

clearRowRestriction()

public ReadOptions.TableReadOptions.Builder clearRowRestriction()

Optional. SQL text filtering statement, similar to a WHERE clause in a SQL 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
TypeDescription
ReadOptions.TableReadOptions.Builder

This builder for chaining.

clearSelectedFields()

public ReadOptions.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
TypeDescription
ReadOptions.TableReadOptions.Builder

This builder for chaining.

clone()

public ReadOptions.TableReadOptions.Builder clone()
Returns
TypeDescription
ReadOptions.TableReadOptions.Builder
Overrides

getDefaultInstanceForType()

public ReadOptions.TableReadOptions getDefaultInstanceForType()
Returns
TypeDescription
ReadOptions.TableReadOptions

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getRowRestriction()

public String getRowRestriction()

Optional. SQL text filtering statement, similar to a WHERE clause in a SQL 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
TypeDescription
String

The rowRestriction.

getRowRestrictionBytes()

public ByteString getRowRestrictionBytes()

Optional. SQL text filtering statement, similar to a WHERE clause in a SQL 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
TypeDescription
ByteString

The bytes for rowRestriction.

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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ProtocolStringList

A list containing the selectedFields.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ReadOptions.TableReadOptions other)

public ReadOptions.TableReadOptions.Builder mergeFrom(ReadOptions.TableReadOptions other)
Parameter
NameDescription
otherReadOptions.TableReadOptions
Returns
TypeDescription
ReadOptions.TableReadOptions.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ReadOptions.TableReadOptions.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ReadOptions.TableReadOptions.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public ReadOptions.TableReadOptions.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
ReadOptions.TableReadOptions.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ReadOptions.TableReadOptions.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ReadOptions.TableReadOptions.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public ReadOptions.TableReadOptions.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ReadOptions.TableReadOptions.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public ReadOptions.TableReadOptions.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
ReadOptions.TableReadOptions.Builder
Overrides

setRowRestriction(String value)

public ReadOptions.TableReadOptions.Builder setRowRestriction(String value)

Optional. SQL text filtering statement, similar to a WHERE clause in a SQL 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
NameDescription
valueString

The rowRestriction to set.

Returns
TypeDescription
ReadOptions.TableReadOptions.Builder

This builder for chaining.

setRowRestrictionBytes(ByteString value)

public ReadOptions.TableReadOptions.Builder setRowRestrictionBytes(ByteString value)

Optional. SQL text filtering statement, similar to a WHERE clause in a SQL 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
NameDescription
valueByteString

The bytes for rowRestriction to set.

Returns
TypeDescription
ReadOptions.TableReadOptions.Builder

This builder for chaining.

setSelectedFields(int index, String value)

public ReadOptions.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
NameDescription
indexint

The index to set the value at.

valueString

The selectedFields to set.

Returns
TypeDescription
ReadOptions.TableReadOptions.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final ReadOptions.TableReadOptions.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ReadOptions.TableReadOptions.Builder
Overrides