public final class AppendRowsRequest extends GeneratedMessageV3 implements AppendRowsRequestOrBuilder
Request message for AppendRows
.
Because AppendRows is a bidirectional streaming RPC, certain parts of the AppendRowsRequest need only be specified for the first request before switching table destinations. You can also switch table destinations within the same connection for the default stream.
The size of a single AppendRowsRequest must be less than 10 MB in size.
Requests larger than this return an error, typically INVALID_ARGUMENT
.
Protobuf type google.cloud.bigquery.storage.v1.AppendRowsRequest
Inheritance
Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > AppendRowsRequestImplements
AppendRowsRequestOrBuilderStatic Fields
DEFAULT_MISSING_VALUE_INTERPRETATION_FIELD_NUMBER
public static final int DEFAULT_MISSING_VALUE_INTERPRETATION_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
MISSING_VALUE_INTERPRETATIONS_FIELD_NUMBER
public static final int MISSING_VALUE_INTERPRETATIONS_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
OFFSET_FIELD_NUMBER
public static final int OFFSET_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
PROTO_ROWS_FIELD_NUMBER
public static final int PROTO_ROWS_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
TRACE_ID_FIELD_NUMBER
public static final int TRACE_ID_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
WRITE_STREAM_FIELD_NUMBER
public static final int WRITE_STREAM_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
Static Methods
getDefaultInstance()
public static AppendRowsRequest getDefaultInstance()
Returns | |
---|---|
Type | Description |
AppendRowsRequest |
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
newBuilder()
public static AppendRowsRequest.Builder newBuilder()
Returns | |
---|---|
Type | Description |
AppendRowsRequest.Builder |
newBuilder(AppendRowsRequest prototype)
public static AppendRowsRequest.Builder newBuilder(AppendRowsRequest prototype)
Parameter | |
---|---|
Name | Description |
prototype |
AppendRowsRequest |
Returns | |
---|---|
Type | Description |
AppendRowsRequest.Builder |
parseDelimitedFrom(InputStream input)
public static AppendRowsRequest parseDelimitedFrom(InputStream input)
Parameter | |
---|---|
Name | Description |
input |
InputStream |
Returns | |
---|---|
Type | Description |
AppendRowsRequest |
Exceptions | |
---|---|
Type | Description |
IOException |
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static AppendRowsRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
InputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
AppendRowsRequest |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(byte[] data)
public static AppendRowsRequest parseFrom(byte[] data)
Parameter | |
---|---|
Name | Description |
data |
byte[] |
Returns | |
---|---|
Type | Description |
AppendRowsRequest |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static AppendRowsRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data |
byte[] |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
AppendRowsRequest |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data)
public static AppendRowsRequest parseFrom(ByteString data)
Parameter | |
---|---|
Name | Description |
data |
ByteString |
Returns | |
---|---|
Type | Description |
AppendRowsRequest |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static AppendRowsRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data |
ByteString |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
AppendRowsRequest |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(CodedInputStream input)
public static AppendRowsRequest parseFrom(CodedInputStream input)
Parameter | |
---|---|
Name | Description |
input |
CodedInputStream |
Returns | |
---|---|
Type | Description |
AppendRowsRequest |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static AppendRowsRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
AppendRowsRequest |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(InputStream input)
public static AppendRowsRequest parseFrom(InputStream input)
Parameter | |
---|---|
Name | Description |
input |
InputStream |
Returns | |
---|---|
Type | Description |
AppendRowsRequest |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static AppendRowsRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
InputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
AppendRowsRequest |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(ByteBuffer data)
public static AppendRowsRequest parseFrom(ByteBuffer data)
Parameter | |
---|---|
Name | Description |
data |
ByteBuffer |
Returns | |
---|---|
Type | Description |
AppendRowsRequest |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static AppendRowsRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data |
ByteBuffer |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
AppendRowsRequest |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parser()
public static Parser<AppendRowsRequest> parser()
Returns | |
---|---|
Type | Description |
Parser<AppendRowsRequest> |
Methods
containsMissingValueInterpretations(String key)
public boolean containsMissingValueInterpretations(String key)
A map to indicate how to interpret missing value for some fields. Missing values are fields present in user schema but missing in rows. The key is the field name. The value is the interpretation of missing values for the field.
For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all missing values in field foo are interpreted as NULL, all missing values in field bar are interpreted as the default value of field bar in table schema.
If a field is not in this map and has missing values, the missing values in this field are interpreted as NULL.
This field only applies to the current request, it won't affect other requests on the connection.
Currently, field name can only be top-level column name, can't be a struct field path like 'foo.bar'.
map<string, .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation> missing_value_interpretations = 7;
Parameter | |
---|---|
Name | Description |
key |
String |
Returns | |
---|---|
Type | Description |
boolean |
equals(Object obj)
public boolean equals(Object obj)
Parameter | |
---|---|
Name | Description |
obj |
Object |
Returns | |
---|---|
Type | Description |
boolean |
getDefaultInstanceForType()
public AppendRowsRequest getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
AppendRowsRequest |
getDefaultMissingValueInterpretation()
public AppendRowsRequest.MissingValueInterpretation getDefaultMissingValueInterpretation()
Optional. Default missing value interpretation for all columns in the
table. When a value is specified on an AppendRowsRequest
, it is applied
to all requests on the connection from that point forward, until a
subsequent AppendRowsRequest
sets it to a different value.
missing_value_interpretation
can override
default_missing_value_interpretation
. For example, if you want to write
NULL
instead of using default values for some columns, you can set
default_missing_value_interpretation
to DEFAULT_VALUE
and at the same
time, set missing_value_interpretations
to NULL_VALUE
on those columns.
.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation default_missing_value_interpretation = 8 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
AppendRowsRequest.MissingValueInterpretation |
The defaultMissingValueInterpretation. |
getDefaultMissingValueInterpretationValue()
public int getDefaultMissingValueInterpretationValue()
Optional. Default missing value interpretation for all columns in the
table. When a value is specified on an AppendRowsRequest
, it is applied
to all requests on the connection from that point forward, until a
subsequent AppendRowsRequest
sets it to a different value.
missing_value_interpretation
can override
default_missing_value_interpretation
. For example, if you want to write
NULL
instead of using default values for some columns, you can set
default_missing_value_interpretation
to DEFAULT_VALUE
and at the same
time, set missing_value_interpretations
to NULL_VALUE
on those columns.
.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation default_missing_value_interpretation = 8 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
int |
The enum numeric value on the wire for defaultMissingValueInterpretation. |
getMissingValueInterpretations() (deprecated)
public Map<String,AppendRowsRequest.MissingValueInterpretation> getMissingValueInterpretations()
Use #getMissingValueInterpretationsMap() instead.
Returns | |
---|---|
Type | Description |
Map<String,MissingValueInterpretation> |
getMissingValueInterpretationsCount()
public int getMissingValueInterpretationsCount()
A map to indicate how to interpret missing value for some fields. Missing values are fields present in user schema but missing in rows. The key is the field name. The value is the interpretation of missing values for the field.
For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all missing values in field foo are interpreted as NULL, all missing values in field bar are interpreted as the default value of field bar in table schema.
If a field is not in this map and has missing values, the missing values in this field are interpreted as NULL.
This field only applies to the current request, it won't affect other requests on the connection.
Currently, field name can only be top-level column name, can't be a struct field path like 'foo.bar'.
map<string, .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation> missing_value_interpretations = 7;
Returns | |
---|---|
Type | Description |
int |
getMissingValueInterpretationsMap()
public Map<String,AppendRowsRequest.MissingValueInterpretation> getMissingValueInterpretationsMap()
A map to indicate how to interpret missing value for some fields. Missing values are fields present in user schema but missing in rows. The key is the field name. The value is the interpretation of missing values for the field.
For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all missing values in field foo are interpreted as NULL, all missing values in field bar are interpreted as the default value of field bar in table schema.
If a field is not in this map and has missing values, the missing values in this field are interpreted as NULL.
This field only applies to the current request, it won't affect other requests on the connection.
Currently, field name can only be top-level column name, can't be a struct field path like 'foo.bar'.
map<string, .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation> missing_value_interpretations = 7;
Returns | |
---|---|
Type | Description |
Map<String,MissingValueInterpretation> |
getMissingValueInterpretationsOrDefault(String key, AppendRowsRequest.MissingValueInterpretation defaultValue)
public AppendRowsRequest.MissingValueInterpretation getMissingValueInterpretationsOrDefault(String key, AppendRowsRequest.MissingValueInterpretation defaultValue)
A map to indicate how to interpret missing value for some fields. Missing values are fields present in user schema but missing in rows. The key is the field name. The value is the interpretation of missing values for the field.
For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all missing values in field foo are interpreted as NULL, all missing values in field bar are interpreted as the default value of field bar in table schema.
If a field is not in this map and has missing values, the missing values in this field are interpreted as NULL.
This field only applies to the current request, it won't affect other requests on the connection.
Currently, field name can only be top-level column name, can't be a struct field path like 'foo.bar'.
map<string, .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation> missing_value_interpretations = 7;
Parameters | |
---|---|
Name | Description |
key |
String |
defaultValue |
AppendRowsRequest.MissingValueInterpretation |
Returns | |
---|---|
Type | Description |
AppendRowsRequest.MissingValueInterpretation |
getMissingValueInterpretationsOrThrow(String key)
public AppendRowsRequest.MissingValueInterpretation getMissingValueInterpretationsOrThrow(String key)
A map to indicate how to interpret missing value for some fields. Missing values are fields present in user schema but missing in rows. The key is the field name. The value is the interpretation of missing values for the field.
For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all missing values in field foo are interpreted as NULL, all missing values in field bar are interpreted as the default value of field bar in table schema.
If a field is not in this map and has missing values, the missing values in this field are interpreted as NULL.
This field only applies to the current request, it won't affect other requests on the connection.
Currently, field name can only be top-level column name, can't be a struct field path like 'foo.bar'.
map<string, .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation> missing_value_interpretations = 7;
Parameter | |
---|---|
Name | Description |
key |
String |
Returns | |
---|---|
Type | Description |
AppendRowsRequest.MissingValueInterpretation |
getMissingValueInterpretationsValue() (deprecated)
public Map<String,Integer> getMissingValueInterpretationsValue()
Use #getMissingValueInterpretationsValueMap() instead.
Returns | |
---|---|
Type | Description |
Map<String,java.lang.Integer> |
getMissingValueInterpretationsValueMap()
public Map<String,Integer> getMissingValueInterpretationsValueMap()
A map to indicate how to interpret missing value for some fields. Missing values are fields present in user schema but missing in rows. The key is the field name. The value is the interpretation of missing values for the field.
For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all missing values in field foo are interpreted as NULL, all missing values in field bar are interpreted as the default value of field bar in table schema.
If a field is not in this map and has missing values, the missing values in this field are interpreted as NULL.
This field only applies to the current request, it won't affect other requests on the connection.
Currently, field name can only be top-level column name, can't be a struct field path like 'foo.bar'.
map<string, .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation> missing_value_interpretations = 7;
Returns | |
---|---|
Type | Description |
Map<String,java.lang.Integer> |
getMissingValueInterpretationsValueOrDefault(String key, int defaultValue)
public int getMissingValueInterpretationsValueOrDefault(String key, int defaultValue)
A map to indicate how to interpret missing value for some fields. Missing values are fields present in user schema but missing in rows. The key is the field name. The value is the interpretation of missing values for the field.
For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all missing values in field foo are interpreted as NULL, all missing values in field bar are interpreted as the default value of field bar in table schema.
If a field is not in this map and has missing values, the missing values in this field are interpreted as NULL.
This field only applies to the current request, it won't affect other requests on the connection.
Currently, field name can only be top-level column name, can't be a struct field path like 'foo.bar'.
map<string, .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation> missing_value_interpretations = 7;
Parameters | |
---|---|
Name | Description |
key |
String |
defaultValue |
int |
Returns | |
---|---|
Type | Description |
int |
getMissingValueInterpretationsValueOrThrow(String key)
public int getMissingValueInterpretationsValueOrThrow(String key)
A map to indicate how to interpret missing value for some fields. Missing values are fields present in user schema but missing in rows. The key is the field name. The value is the interpretation of missing values for the field.
For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all missing values in field foo are interpreted as NULL, all missing values in field bar are interpreted as the default value of field bar in table schema.
If a field is not in this map and has missing values, the missing values in this field are interpreted as NULL.
This field only applies to the current request, it won't affect other requests on the connection.
Currently, field name can only be top-level column name, can't be a struct field path like 'foo.bar'.
map<string, .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation> missing_value_interpretations = 7;
Parameter | |
---|---|
Name | Description |
key |
String |
Returns | |
---|---|
Type | Description |
int |
getOffset()
public Int64Value getOffset()
If present, the write is only performed if the next append offset is same as the provided value. If not present, the write is performed at the current end of stream. Specifying a value for this field is not allowed when calling AppendRows for the '_default' stream.
.google.protobuf.Int64Value offset = 2;
Returns | |
---|---|
Type | Description |
Int64Value |
The offset. |
getOffsetOrBuilder()
public Int64ValueOrBuilder getOffsetOrBuilder()
If present, the write is only performed if the next append offset is same as the provided value. If not present, the write is performed at the current end of stream. Specifying a value for this field is not allowed when calling AppendRows for the '_default' stream.
.google.protobuf.Int64Value offset = 2;
Returns | |
---|---|
Type | Description |
Int64ValueOrBuilder |
getParserForType()
public Parser<AppendRowsRequest> getParserForType()
Returns | |
---|---|
Type | Description |
Parser<AppendRowsRequest> |
getProtoRows()
public AppendRowsRequest.ProtoData getProtoRows()
Rows in proto format.
.google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData proto_rows = 4;
Returns | |
---|---|
Type | Description |
AppendRowsRequest.ProtoData |
The protoRows. |
getProtoRowsOrBuilder()
public AppendRowsRequest.ProtoDataOrBuilder getProtoRowsOrBuilder()
Rows in proto format.
.google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData proto_rows = 4;
Returns | |
---|---|
Type | Description |
AppendRowsRequest.ProtoDataOrBuilder |
getRowsCase()
public AppendRowsRequest.RowsCase getRowsCase()
Returns | |
---|---|
Type | Description |
AppendRowsRequest.RowsCase |
getSerializedSize()
public int getSerializedSize()
Returns | |
---|---|
Type | Description |
int |
getTraceId()
public String getTraceId()
Id set by client to annotate its identity. Only initial request setting is respected.
string trace_id = 6;
Returns | |
---|---|
Type | Description |
String |
The traceId. |
getTraceIdBytes()
public ByteString getTraceIdBytes()
Id set by client to annotate its identity. Only initial request setting is respected.
string trace_id = 6;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for traceId. |
getWriteStream()
public String getWriteStream()
Required. The write_stream identifies the append operation. It must be provided in the following scenarios:
In the first request to an AppendRows connection.
In all subsequent requests to an AppendRows connection, if you use the same connection to write to multiple tables or change the input schema for default streams.
For explicitly created write streams, the format is:
projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}
For the special default stream, the format is:
projects/{project}/datasets/{dataset}/tables/{table}/streams/_default
.An example of a possible sequence of requests with write_stream fields within a single connection:
r1: {write_stream: stream_name_1}
r2: {write_stream: /*omit*/}
r3: {write_stream: /*omit*/}
r4: {write_stream: stream_name_2}
r5: {write_stream: stream_name_2}
The destination changed in request_4, so the write_stream field must be populated in all subsequent requests in this stream.
string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Returns | |
---|---|
Type | Description |
String |
The writeStream. |
getWriteStreamBytes()
public ByteString getWriteStreamBytes()
Required. The write_stream identifies the append operation. It must be provided in the following scenarios:
In the first request to an AppendRows connection.
In all subsequent requests to an AppendRows connection, if you use the same connection to write to multiple tables or change the input schema for default streams.
For explicitly created write streams, the format is:
projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}
For the special default stream, the format is:
projects/{project}/datasets/{dataset}/tables/{table}/streams/_default
.An example of a possible sequence of requests with write_stream fields within a single connection:
r1: {write_stream: stream_name_1}
r2: {write_stream: /*omit*/}
r3: {write_stream: /*omit*/}
r4: {write_stream: stream_name_2}
r5: {write_stream: stream_name_2}
The destination changed in request_4, so the write_stream field must be populated in all subsequent requests in this stream.
string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for writeStream. |
hasOffset()
public boolean hasOffset()
If present, the write is only performed if the next append offset is same as the provided value. If not present, the write is performed at the current end of stream. Specifying a value for this field is not allowed when calling AppendRows for the '_default' stream.
.google.protobuf.Int64Value offset = 2;
Returns | |
---|---|
Type | Description |
boolean |
Whether the offset field is set. |
hasProtoRows()
public boolean hasProtoRows()
Rows in proto format.
.google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData proto_rows = 4;
Returns | |
---|---|
Type | Description |
boolean |
Whether the protoRows field is set. |
hashCode()
public int hashCode()
Returns | |
---|---|
Type | Description |
int |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
internalGetMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter | |
---|---|
Name | Description |
number |
int |
Returns | |
---|---|
Type | Description |
com.google.protobuf.MapFieldReflectionAccessor |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
newBuilderForType()
public AppendRowsRequest.Builder newBuilderForType()
Returns | |
---|---|
Type | Description |
AppendRowsRequest.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected AppendRowsRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter | |
---|---|
Name | Description |
parent |
BuilderParent |
Returns | |
---|---|
Type | Description |
AppendRowsRequest.Builder |
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter | |
---|---|
Name | Description |
unused |
UnusedPrivateParameter |
Returns | |
---|---|
Type | Description |
Object |
toBuilder()
public AppendRowsRequest.Builder toBuilder()
Returns | |
---|---|
Type | Description |
AppendRowsRequest.Builder |
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter | |
---|---|
Name | Description |
output |
CodedOutputStream |
Exceptions | |
---|---|
Type | Description |
IOException |