Skip to content

Commit

Permalink
feat: Deprecate format specific row_count field in Read API (#249)
Browse files Browse the repository at this point in the history
* fix!: remove bigquery.readonly auth scope

PiperOrigin-RevId: 429331987

Source-Link: googleapis/googleapis@4b2bd26

Source-Link: googleapis/googleapis-gen@fa17f03
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZmExN2YwM2I1YWU5NjMxNmNkMDJmMjk5N2YyZmQxMTk2ZTAzNGU1ZSJ9

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* docs(samples): include metadata file, add exclusions for samples to handwritten libraries

PiperOrigin-RevId: 429395631

Source-Link: googleapis/googleapis@84594b3

Source-Link: googleapis/googleapis-gen@ed74f97
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWQ3NGY5NzBmZDgyOTE0ODc0ZTZiMjdiMDQ3NjNjZmE2NmJhZmU5YiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* feat: add trace_id for Read API

PiperOrigin-RevId: 429809867

Source-Link: googleapis/googleapis@6052603

Source-Link: googleapis/googleapis-gen@840dd14
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiODQwZGQxNGM5MWEwZWM2NmQ5YmQxYTAyOGQwMWI1ZmQwMjljYTAyZSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* docs: improve documentation for write client
feat: update default timeout/retry information
feat: update parent annotation for BatchCommitWriteStreamsRequest
feat: expose additional StorageError enum values

PiperOrigin-RevId: 431973595

Source-Link: googleapis/googleapis@25d691b

Source-Link: googleapis/googleapis-gen@0ca2187
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGNhMjE4NzlhZTMxMzZhMmQ3MWZhODI0YjQ5ZGZhZjhhMGFlMGYyZSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* chore: update v2.14.1 gapic-generator-typescript

Committer: @summer-ji-eng
PiperOrigin-RevId: 433031262

Source-Link: googleapis/googleapis@2a55d13

Source-Link: googleapis/googleapis-gen@2fce389
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmZjZTM4OTNhZTlkYTQ3NzYzZTA4NzJjNGEzYTg3ZDlmZjc4NzcxZiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* chore: update v2.14.2 gapic-generator-typescript

Committer: @summer-ji-eng
PiperOrigin-RevId: 434859890

Source-Link: googleapis/googleapis@bc2432d

Source-Link: googleapis/googleapis-gen@930b673
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTMwYjY3MzEwM2U5MjUyM2Y4Y2ZlZDM4ZGVjZDdkM2FmYWU4ZWJlNyJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* feat: Deprecate format specific `row_count` field in Read API

PiperOrigin-RevId: 438434001

Source-Link: googleapis/googleapis@727f08b

Source-Link: googleapis/googleapis-gen@2d62ab0
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmQ2MmFiMGQzZDY1MGI3YWJhNGVjNWU1YTk2ZGQ4Y2RiYWU4OWZiNyJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Steffany Brown <30247553+steffnay@users.noreply.github.com>
Co-authored-by: Benjamin E. Coe <bencoe@google.com>
Co-authored-by: Jeffrey Rennie <rennie@google.com>
  • Loading branch information
5 people committed Apr 11, 2022
1 parent 5543660 commit fb8acf1
Show file tree
Hide file tree
Showing 33 changed files with 1,239 additions and 81 deletions.
10 changes: 8 additions & 2 deletions linkinator.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
"skip": [
"https://codecov.io/gh/googleapis/",
"www.googleapis.com",
"img.shields.io"
"img.shields.io",
"https://console.cloud.google.com/cloudshell",
"https://support.google.com"
],
"silent": true,
"concurrency": 5
"concurrency": 5,
"retry": true,
"retryErrors": true,
"retryErrorsCount": 5,
"retryErrorsJitter": 3000
}
7 changes: 4 additions & 3 deletions protos/google/cloud/bigquery/storage/v1/arrow.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -39,8 +39,9 @@ message ArrowRecordBatch {
// IPC-serialized Arrow RecordBatch.
bytes serialized_record_batch = 1;

// The count of rows in `serialized_record_batch`.
int64 row_count = 2;
// [Deprecated] The count of rows in `serialized_record_batch`.
// Please use the format-independent ReadRowsResponse.row_count instead.
int64 row_count = 2 [deprecated = true];
}

// Contains options specific to Arrow Serialization.
Expand Down
7 changes: 4 additions & 3 deletions protos/google/cloud/bigquery/storage/v1/avro.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -35,6 +35,7 @@ message AvroRows {
// Binary serialized rows in a block.
bytes serialized_binary_rows = 1;

// The count of rows in the returning block.
int64 row_count = 2;
// [Deprecated] The count of rows in the returning block.
// Please use the format-independent ReadRowsResponse.row_count instead.
int64 row_count = 2 [deprecated = true];
}
2 changes: 1 addition & 1 deletion protos/google/cloud/bigquery/storage/v1/protobuf.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
27 changes: 22 additions & 5 deletions protos/google/cloud/bigquery/storage/v1/storage.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -47,7 +47,6 @@ service BigQueryRead {
option (google.api.default_host) = "bigquerystorage.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/bigquery,"
"https://www.googleapis.com/auth/bigquery.readonly,"
"https://www.googleapis.com/auth/cloud-platform";

// Creates a new read session. A read session divides the contents of a
Expand Down Expand Up @@ -168,6 +167,13 @@ service BigQueryWrite {
// * For PENDING streams, data is not made visible until the stream itself is
// finalized (via the `FinalizeWriteStream` rpc), and the stream is explicitly
// committed via the `BatchCommitWriteStreams` rpc.
//
// Note: For users coding against the gRPC api directly, it may be
// necessary to supply the x-goog-request-params system parameter
// with `write_stream=<full_write_stream_name>`.
//
// More information about system parameters:
// https://cloud.google.com/apis/docs/system-parameters
rpc AppendRows(stream AppendRowsRequest) returns (stream AppendRowsResponse) {
option (google.api.http) = {
post: "/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}"
Expand Down Expand Up @@ -409,10 +415,12 @@ message AppendRowsRequest {
// request.
//
// For explicitly created write streams, the format is:
// `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}`
//
// * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}`
//
// For the special default stream, the format is:
// `projects/{project}/datasets/{dataset}/tables/{table}/_default`.
//
// * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`.
string write_stream = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down Expand Up @@ -499,7 +507,10 @@ message BatchCommitWriteStreamsRequest {
// Required. Parent table that all the streams should belong to, in the form of
// `projects/{project}/datasets/{dataset}/tables/{table}`.
string parent = 1 [
(google.api.field_behavior) = REQUIRED
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "bigquery.googleapis.com/Table"
}
];

// Required. The group of streams that will be committed atomically.
Expand Down Expand Up @@ -594,6 +605,12 @@ message StorageError {
// There is a schema mismatch and it is caused by user schema has extra
// field than bigquery schema.
SCHEMA_MISMATCH_EXTRA_FIELDS = 7;

// Offset already exists.
OFFSET_ALREADY_EXISTS = 8;

// Offset out of range.
OFFSET_OUT_OF_RANGE = 9;
}

// BigQuery Storage specific error code.
Expand Down
10 changes: 9 additions & 1 deletion protos/google/cloud/bigquery/storage/v1/stream.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -132,6 +132,14 @@ message ReadSession {
// all streams are completely consumed. This estimate is based on
// metadata from the table which might be incomplete or stale.
int64 estimated_total_bytes_scanned = 12 [(google.api.field_behavior) = OUTPUT_ONLY];

// Optional. ID set by client to annotate a session identity. This does not need
// to be strictly unique, but instead the same ID should be used to group
// logically connected sessions (e.g. All using the same ID for all sessions
// needed to complete a Spark SQL query is reasonable).
//
// Maximum length is 256 bytes.
string trace_id = 13 [(google.api.field_behavior) = OPTIONAL];
}

// Information about a single stream that gets data out of the storage system.
Expand Down
2 changes: 1 addition & 1 deletion protos/google/cloud/bigquery/storage/v1/table.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
1 change: 0 additions & 1 deletion protos/google/cloud/bigquery/storage/v1beta1/storage.proto
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ service BigQueryStorage {
option (google.api.default_host) = "bigquerystorage.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/bigquery,"
"https://www.googleapis.com/auth/bigquery.readonly,"
"https://www.googleapis.com/auth/cloud-platform";

// Creates a new read session. A read session divides the contents of a
Expand Down
10 changes: 9 additions & 1 deletion protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions protos/protos.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 22 additions & 6 deletions protos/protos.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fb8acf1

Please sign in to comment.