Skip to content

Commit

Permalink
feat: add table sampling to ReadAPI v1
Browse files Browse the repository at this point in the history
feat: add storage error codes for KMS

PiperOrigin-RevId: 534092654
  • Loading branch information
Google APIs authored and Copybara-Service committed May 22, 2023
1 parent aa4559a commit adcd87e
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 6 deletions.
2 changes: 1 addition & 1 deletion google/cloud/bigquery/storage/v1/arrow.proto
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 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
2 changes: 1 addition & 1 deletion google/cloud/bigquery/storage/v1/avro.proto
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 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
2 changes: 1 addition & 1 deletion google/cloud/bigquery/storage/v1/protobuf.proto
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 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
18 changes: 17 additions & 1 deletion google/cloud/bigquery/storage/v1/storage.proto
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 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 @@ -669,6 +669,22 @@ message StorageError {

// Offset out of range.
OFFSET_OUT_OF_RANGE = 9;

// Customer-managed encryption key (CMEK) not provided for CMEK-enabled
// data.
CMEK_NOT_PROVIDED = 10;

// Customer-managed encryption key (CMEK) was incorrectly provided.
INVALID_CMEK_PROVIDED = 11;

// There is an encryption error while using customer-managed encryption key.
CMEK_ENCRYPTION_ERROR = 12;

// Key Management Service (KMS) service returned an error.
KMS_SERVICE_ERROR = 13;

// Permission denied while using customer-managed encryption key.
KMS_PERMISSION_DENIED = 14;
}

// BigQuery Storage specific error code.
Expand Down
11 changes: 10 additions & 1 deletion google/cloud/bigquery/storage/v1/stream.proto
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 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 @@ -129,6 +129,15 @@ message ReadSession {
AvroSerializationOptions avro_serialization_options = 4
[(google.api.field_behavior) = OPTIONAL];
}

// Optional. Specifies a table sampling percentage. Specifically, the query
// planner will use TABLESAMPLE SYSTEM (sample_percentage PERCENT). This
// samples at the file-level. It will randomly choose for each file whether
// to include that file in the sample returned. Note, that if the table only
// has one file, then TABLESAMPLE SYSTEM will select that file and return
// all returnable rows contained within.
optional double sample_percentage = 5
[(google.api.field_behavior) = OPTIONAL];
}

// Output only. Unique identifier for the session, in the form
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/bigquery/storage/v1/table.proto
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 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

0 comments on commit adcd87e

Please sign in to comment.