Skip to content

Commit adcd87e

Browse files
Google APIscopybara-github
authored andcommitted
feat: add table sampling to ReadAPI v1
feat: add storage error codes for KMS PiperOrigin-RevId: 534092654
1 parent aa4559a commit adcd87e

6 files changed

Lines changed: 31 additions & 6 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2022 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2022 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2022 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2022 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -669,6 +669,22 @@ message StorageError {
669669

670670
// Offset out of range.
671671
OFFSET_OUT_OF_RANGE = 9;
672+
673+
// Customer-managed encryption key (CMEK) not provided for CMEK-enabled
674+
// data.
675+
CMEK_NOT_PROVIDED = 10;
676+
677+
// Customer-managed encryption key (CMEK) was incorrectly provided.
678+
INVALID_CMEK_PROVIDED = 11;
679+
680+
// There is an encryption error while using customer-managed encryption key.
681+
CMEK_ENCRYPTION_ERROR = 12;
682+
683+
// Key Management Service (KMS) service returned an error.
684+
KMS_SERVICE_ERROR = 13;
685+
686+
// Permission denied while using customer-managed encryption key.
687+
KMS_PERMISSION_DENIED = 14;
672688
}
673689

674690
// BigQuery Storage specific error code.

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2022 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -129,6 +129,15 @@ message ReadSession {
129129
AvroSerializationOptions avro_serialization_options = 4
130130
[(google.api.field_behavior) = OPTIONAL];
131131
}
132+
133+
// Optional. Specifies a table sampling percentage. Specifically, the query
134+
// planner will use TABLESAMPLE SYSTEM (sample_percentage PERCENT). This
135+
// samples at the file-level. It will randomly choose for each file whether
136+
// to include that file in the sample returned. Note, that if the table only
137+
// has one file, then TABLESAMPLE SYSTEM will select that file and return
138+
// all returnable rows contained within.
139+
optional double sample_percentage = 5
140+
[(google.api.field_behavior) = OPTIONAL];
132141
}
133142

134143
// Output only. Unique identifier for the session, in the form

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2022 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)