|
1 | | -// Copyright 2021 Google LLC |
| 1 | +// Copyright 2022 Google LLC |
2 | 2 | // |
3 | 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
4 | 4 | // you may not use this file except in compliance with the License. |
@@ -47,7 +47,6 @@ service BigQueryRead { |
47 | 47 | option (google.api.default_host) = "bigquerystorage.googleapis.com"; |
48 | 48 | option (google.api.oauth_scopes) = |
49 | 49 | "https://www.googleapis.com/auth/bigquery," |
50 | | - "https://www.googleapis.com/auth/bigquery.readonly," |
51 | 50 | "https://www.googleapis.com/auth/cloud-platform"; |
52 | 51 |
|
53 | 52 | // Creates a new read session. A read session divides the contents of a |
@@ -168,6 +167,13 @@ service BigQueryWrite { |
168 | 167 | // * For PENDING streams, data is not made visible until the stream itself is |
169 | 168 | // finalized (via the `FinalizeWriteStream` rpc), and the stream is explicitly |
170 | 169 | // committed via the `BatchCommitWriteStreams` rpc. |
| 170 | + // |
| 171 | + // Note: For users coding against the gRPC api directly, it may be |
| 172 | + // necessary to supply the x-goog-request-params system parameter |
| 173 | + // with `write_stream=<full_write_stream_name>`. |
| 174 | + // |
| 175 | + // More information about system parameters: |
| 176 | + // https://cloud.google.com/apis/docs/system-parameters |
171 | 177 | rpc AppendRows(stream AppendRowsRequest) returns (stream AppendRowsResponse) { |
172 | 178 | option (google.api.http) = { |
173 | 179 | post: "/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}" |
@@ -409,10 +415,12 @@ message AppendRowsRequest { |
409 | 415 | // request. |
410 | 416 | // |
411 | 417 | // For explicitly created write streams, the format is: |
412 | | - // `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` |
| 418 | + // |
| 419 | + // * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` |
413 | 420 | // |
414 | 421 | // For the special default stream, the format is: |
415 | | - // `projects/{project}/datasets/{dataset}/tables/{table}/_default`. |
| 422 | + // |
| 423 | + // * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`. |
416 | 424 | string write_stream = 1 [ |
417 | 425 | (google.api.field_behavior) = REQUIRED, |
418 | 426 | (google.api.resource_reference) = { |
@@ -499,7 +507,10 @@ message BatchCommitWriteStreamsRequest { |
499 | 507 | // Required. Parent table that all the streams should belong to, in the form of |
500 | 508 | // `projects/{project}/datasets/{dataset}/tables/{table}`. |
501 | 509 | string parent = 1 [ |
502 | | - (google.api.field_behavior) = REQUIRED |
| 510 | + (google.api.field_behavior) = REQUIRED, |
| 511 | + (google.api.resource_reference) = { |
| 512 | + type: "bigquery.googleapis.com/Table" |
| 513 | + } |
503 | 514 | ]; |
504 | 515 |
|
505 | 516 | // Required. The group of streams that will be committed atomically. |
@@ -594,6 +605,12 @@ message StorageError { |
594 | 605 | // There is a schema mismatch and it is caused by user schema has extra |
595 | 606 | // field than bigquery schema. |
596 | 607 | SCHEMA_MISMATCH_EXTRA_FIELDS = 7; |
| 608 | + |
| 609 | + // Offset already exists. |
| 610 | + OFFSET_ALREADY_EXISTS = 8; |
| 611 | + |
| 612 | + // Offset out of range. |
| 613 | + OFFSET_OUT_OF_RANGE = 9; |
597 | 614 | } |
598 | 615 |
|
599 | 616 | // BigQuery Storage specific error code. |
|
0 commit comments