Skip to content

Commit d33b3fa

Browse files
Google APIscopybara-github
authored andcommitted
docs: clarify size limitations for AppendRowsRequest
chore: add preferred_min_stream_count to CreateReadSessionRequest chore: add write_stream to AppendRowsResponse PiperOrigin-RevId: 463602530
1 parent e8f5319 commit d33b3fa

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

google/cloud/bigquery/storage/v1/bigquerystorage_v1.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ backend:
1717
deadline: 120.0
1818
- selector: 'google.cloud.bigquery.storage.v1.BigQueryWrite.*'
1919
deadline: 120.0
20-
- selector: google.cloud.bigquery.storage.v1.BigQueryWrite.AppendRows
21-
deadline: 21600.0
20+
- selector: google.cloud.bigquery.storage.v1.BigQueryWrite.CreateWriteStream
21+
deadline: 600.0
2222

2323
authentication:
2424
rules:

google/cloud/bigquery/storage/v1/storage.proto

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,16 @@ message CreateReadSessionRequest {
256256
// determine an upper bound OR set this a size for the maximum "units of work"
257257
// it can gracefully handle.
258258
int32 max_stream_count = 3;
259+
260+
// The minimum preferred stream count. This parameter can be used to inform
261+
// the service that there is a desired lower bound on the number of streams.
262+
// This is typically a target parallelism of the client (e.g. a Spark
263+
// cluster with N-workers would set this to a low multiple of N to ensure
264+
// good cluster utilization).
265+
//
266+
// The system will make a best effort to provide at least this number of
267+
// streams, but in some cases might provide less.
268+
int32 preferred_min_stream_count = 4;
259269
}
260270

261271
// Request message for `ReadRows`.
@@ -395,6 +405,9 @@ message CreateWriteStreamRequest {
395405
// Due to the nature of AppendRows being a bidirectional streaming RPC, certain
396406
// parts of the AppendRowsRequest need only be specified for the first request
397407
// sent each time the gRPC network connection is opened/reopened.
408+
//
409+
// The size of a single AppendRowsRequest must be less than 10 MB in size.
410+
// Requests larger than this return an error, typically `INVALID_ARGUMENT`.
398411
message AppendRowsRequest {
399412
// ProtoData contains the data rows and schema when constructing append
400413
// requests.
@@ -495,6 +508,10 @@ message AppendRowsResponse {
495508
// appended. The API will return row level error info, so that the caller can
496509
// remove the bad rows and retry the request.
497510
repeated RowError row_errors = 4;
511+
512+
// The target of the append operation. Matches the write_stream in the
513+
// corresponding request.
514+
string write_stream = 5;
498515
}
499516

500517
// Request message for `GetWriteStreamRequest`.

0 commit comments

Comments
 (0)