diff --git a/google/cloud/bigquery_storage_v1/types/storage.py b/google/cloud/bigquery_storage_v1/types/storage.py index 2b576fbd..d0b707a4 100644 --- a/google/cloud/bigquery_storage_v1/types/storage.py +++ b/google/cloud/bigquery_storage_v1/types/storage.py @@ -790,6 +790,21 @@ class StorageErrorCode(proto.Enum): Offset already exists. OFFSET_OUT_OF_RANGE (9): Offset out of range. + CMEK_NOT_PROVIDED (10): + Customer-managed encryption key (CMEK) not + provided for CMEK-enabled data. + INVALID_CMEK_PROVIDED (11): + Customer-managed encryption key (CMEK) was + incorrectly provided. + CMEK_ENCRYPTION_ERROR (12): + There is an encryption error while using + customer-managed encryption key. + KMS_SERVICE_ERROR (13): + Key Management Service (KMS) service returned + an error. + KMS_PERMISSION_DENIED (14): + Permission denied while using + customer-managed encryption key. """ STORAGE_ERROR_CODE_UNSPECIFIED = 0 TABLE_NOT_FOUND = 1 @@ -801,6 +816,11 @@ class StorageErrorCode(proto.Enum): SCHEMA_MISMATCH_EXTRA_FIELDS = 7 OFFSET_ALREADY_EXISTS = 8 OFFSET_OUT_OF_RANGE = 9 + CMEK_NOT_PROVIDED = 10 + INVALID_CMEK_PROVIDED = 11 + CMEK_ENCRYPTION_ERROR = 12 + KMS_SERVICE_ERROR = 13 + KMS_PERMISSION_DENIED = 14 code: StorageErrorCode = proto.Field( proto.ENUM, diff --git a/google/cloud/bigquery_storage_v1/types/stream.py b/google/cloud/bigquery_storage_v1/types/stream.py index 459c285f..6fee0412 100644 --- a/google/cloud/bigquery_storage_v1/types/stream.py +++ b/google/cloud/bigquery_storage_v1/types/stream.py @@ -230,6 +230,16 @@ class TableReadOptions(proto.Message): output format This field is a member of `oneof`_ ``output_format_serialization_options``. + sample_percentage (float): + 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. + + This field is a member of `oneof`_ ``_sample_percentage``. """ selected_fields: MutableSequence[str] = proto.RepeatedField( @@ -252,6 +262,11 @@ class TableReadOptions(proto.Message): oneof="output_format_serialization_options", message=avro.AvroSerializationOptions, ) + sample_percentage: float = proto.Field( + proto.DOUBLE, + number=5, + optional=True, + ) name: str = proto.Field( proto.STRING, diff --git a/samples/generated_samples/snippet_metadata_google.cloud.bigquery.storage.v1.json b/samples/generated_samples/snippet_metadata_google.cloud.bigquery.storage.v1.json index a29de587..c1d15715 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.bigquery.storage.v1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.bigquery.storage.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-bigquery-storage", - "version": "2.19.1" + "version": "0.1.0" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.cloud.bigquery.storage.v1beta2.json b/samples/generated_samples/snippet_metadata_google.cloud.bigquery.storage.v1beta2.json index aa4256a8..302b7815 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.bigquery.storage.v1beta2.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.bigquery.storage.v1beta2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-bigquery-storage", - "version": "2.19.1" + "version": "0.1.0" }, "snippets": [ {