AppendRowsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Request message for AppendRows
.
Due to the nature of AppendRows being a bidirectional streaming RPC, certain parts of the AppendRowsRequest need only be specified for the first request sent each time the gRPC network connection is opened/reopened.
The size of a single AppendRowsRequest must be less than 10 MB in
size. Requests larger than this return an error, typically
INVALID_ARGUMENT
.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes
Name | Description |
write_stream |
str
Required. The write_stream identifies the target of the append operation, and only needs to be specified as part of the first request on the gRPC connection. If provided for subsequent requests, it must match the value of the first request. 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 .
|
offset |
google.protobuf.wrappers_pb2.Int64Value
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. |
proto_rows |
google.cloud.bigquery_storage_v1.types.AppendRowsRequest.ProtoData
Rows in proto format. This field is a member of oneof _ rows .
|
trace_id |
str
Id set by client to annotate its identity. Only initial request setting is respected. |
missing_value_interpretations |
MutableMapping[str, google.cloud.bigquery_storage_v1.types.AppendRowsRequest.MissingValueInterpretation]
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'. |
Classes
MissingValueInterpretation
MissingValueInterpretation(value)
An enum to indicate how to interpret missing values. Missing values are fields present in user schema but missing in rows. A missing value can represent a NULL or a column default value defined in BigQuery table schema.
Values: MISSING_VALUE_INTERPRETATION_UNSPECIFIED (0): Invalid missing value interpretation. Requests with this value will be rejected. NULL_VALUE (1): Missing value is interpreted as NULL. DEFAULT_VALUE (2): Missing value is interpreted as column default value if declared in the table schema, NULL otherwise.
MissingValueInterpretationsEntry
MissingValueInterpretationsEntry(
mapping=None, *, ignore_unknown_fields=False, **kwargs
)
The abstract base class for a message.
Name | Description |
kwargs |
dict
Keys and values corresponding to the fields of the message. |
mapping |
Union[dict,
A dictionary or message to be used to determine the values for this message. |
ignore_unknown_fields |
Optional(bool)
If True, do not raise errors for unknown fields. Only applied if |
ProtoData
ProtoData(mapping=None, *, ignore_unknown_fields=False, **kwargs)
ProtoData contains the data rows and schema when constructing append requests.