# BigQuery Storage V1 API - Class Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest (v1.7.0)

1.7.0 (latest) 1.6.0 1.5.1 1.4.0 1.3.1 1.2.0 1.1.0 1.0.1 0.27.0 0.26.0 0.25.2 0.24.0 0.23.0 0.22.0 0.21.0 0.20.0 0.19.1 0.18.0 0.17.0 0.16.0 0.15.1 0.14.0 0.13.0 0.12.0 0.11.1 0.10.1 0.9.2 Reference documentation and code samples for the BigQuery Storage V1 API class Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.

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.

<br />

The size of a single AppendRowsRequest must be less than 10 MB in size.
Requests larger than this return an error, typically `INVALID_ARGUMENT`.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #arrow_rows

    def arrow_rows() -> ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::ArrowData

**Returns**

- ([::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::ArrowData](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery-storage-v1/latest/Google-Cloud-Bigquery-Storage-V1-AppendRowsRequest-ArrowData)) --- Rows in arrow format.


  Note: The following fields are mutually exclusive: `arrow_rows`, `proto_rows`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #arrow_rows=

    def arrow_rows=(value) -> ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::ArrowData

**Parameter**

- **value** ([::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::ArrowData](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery-storage-v1/latest/Google-Cloud-Bigquery-Storage-V1-AppendRowsRequest-ArrowData)) --- Rows in arrow format.


  Note: The following fields are mutually exclusive: `arrow_rows`, `proto_rows`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::ArrowData](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery-storage-v1/latest/Google-Cloud-Bigquery-Storage-V1-AppendRowsRequest-ArrowData)) --- Rows in arrow format.


  Note: The following fields are mutually exclusive: `arrow_rows`, `proto_rows`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #default_missing_value_interpretation

    def default_missing_value_interpretation() -> ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::MissingValueInterpretation

**Returns**

- ([::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::MissingValueInterpretation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery-storage-v1/latest/Google-Cloud-Bigquery-Storage-V1-AppendRowsRequest-MissingValueInterpretation)) --- 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 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.

### #default_missing_value_interpretation=

    def default_missing_value_interpretation=(value) -> ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::MissingValueInterpretation

**Parameter**

- **value** ([::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::MissingValueInterpretation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery-storage-v1/latest/Google-Cloud-Bigquery-Storage-V1-AppendRowsRequest-MissingValueInterpretation)) --- 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 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.
**Returns**

- ([::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::MissingValueInterpretation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery-storage-v1/latest/Google-Cloud-Bigquery-Storage-V1-AppendRowsRequest-MissingValueInterpretation)) --- 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 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.

### #missing_value_interpretations

    def missing_value_interpretations() -> ::Google::Protobuf::Map{::String => ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::MissingValueInterpretation}

**Returns**

- (::Google::Protobuf::Map{::String =\> ::Google::Cloud::Bigquery::Storage::V1::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'.

### #missing_value_interpretations=

    def missing_value_interpretations=(value) -> ::Google::Protobuf::Map{::String => ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::MissingValueInterpretation}

**Parameter**

- **value** (::Google::Protobuf::Map{::String =\> ::Google::Cloud::Bigquery::Storage::V1::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'.
**Returns**

- (::Google::Protobuf::Map{::String =\> ::Google::Cloud::Bigquery::Storage::V1::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'.

### #offset

    def offset() -> ::Google::Protobuf::Int64Value

**Returns**

- ([::Google::Protobuf::Int64Value](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery-storage-v1/latest/Google-Protobuf-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.

### #offset=

    def offset=(value) -> ::Google::Protobuf::Int64Value

**Parameter**

- **value** ([::Google::Protobuf::Int64Value](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery-storage-v1/latest/Google-Protobuf-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.
**Returns**

- ([::Google::Protobuf::Int64Value](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery-storage-v1/latest/Google-Protobuf-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

    def proto_rows() -> ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::ProtoData

**Returns**

- ([::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::ProtoData](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery-storage-v1/latest/Google-Cloud-Bigquery-Storage-V1-AppendRowsRequest-ProtoData)) --- Rows in proto format.


  Note: The following fields are mutually exclusive: `proto_rows`, `arrow_rows`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #proto_rows=

    def proto_rows=(value) -> ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::ProtoData

**Parameter**

- **value** ([::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::ProtoData](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery-storage-v1/latest/Google-Cloud-Bigquery-Storage-V1-AppendRowsRequest-ProtoData)) --- Rows in proto format.


  Note: The following fields are mutually exclusive: `proto_rows`, `arrow_rows`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::ProtoData](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery-storage-v1/latest/Google-Cloud-Bigquery-Storage-V1-AppendRowsRequest-ProtoData)) --- Rows in proto format.


  Note: The following fields are mutually exclusive: `proto_rows`, `arrow_rows`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #trace_id

    def trace_id() -> ::String

**Returns**

- (::String) --- Id set by client to annotate its identity. Only initial request setting is respected.

### #trace_id=

    def trace_id=(value) -> ::String

**Parameter**

- **value** (::String) --- Id set by client to annotate its identity. Only initial request setting is respected.
**Returns**

- (::String) --- Id set by client to annotate its identity. Only initial request setting is respected.

### #write_stream

    def write_stream() -> ::String

**Returns**

- (::String) --- 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.

### #write_stream=

    def write_stream=(value) -> ::String

**Parameter**

- **value** (::String) --- 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.
**Returns**

- (::String) --- 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.