Skip to content
This repository was archived by the owner on Sep 12, 2025. It is now read-only.

Commit 9550ea6

Browse files
feat: add default_missing_value_interpretation field; indicate KMS_SERVICE_ERROR is retryable (#637)
* feat: add beta2 deprecation message PiperOrigin-RevId: 556875976 Source-Link: googleapis/googleapis@29b8ec7 Source-Link: googleapis/googleapis-gen@cc401b7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2M0MDFiN2NhYzVjNzdjNjgxMDU2Yzc4OGFiMWM4ZTIwMjVlN2JhNiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add default_missing_value_interpretation field; indicate KMS_SERVICE_ERROR is retryable PiperOrigin-RevId: 556931084 Source-Link: googleapis/googleapis@ca3d7e8 Source-Link: googleapis/googleapis-gen@861a1c3 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiODYxYTFjMzQ2MjRhNTcyNTEzNDVjODIwZDY5ODg3YTQ5NWVlNDE3YSJ9 * 🦉 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>
1 parent 97d3db1 commit 9550ea6

File tree

6 files changed

+45
-2
lines changed

6 files changed

+45
-2
lines changed

google/cloud/bigquery_storage_v1/types/storage.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,20 @@ class AppendRowsRequest(proto.Message):
438438
439439
Currently, field name can only be top-level column name,
440440
can't be a struct field path like 'foo.bar'.
441+
default_missing_value_interpretation (google.cloud.bigquery_storage_v1.types.AppendRowsRequest.MissingValueInterpretation):
442+
Optional. Default missing value interpretation for all
443+
columns in the table. When a value is specified on an
444+
``AppendRowsRequest``, it is applied to all requests on the
445+
connection from that point forward, until a subsequent
446+
``AppendRowsRequest`` sets it to a different value.
447+
``missing_value_interpretation`` can override
448+
``default_missing_value_interpretation``. For example, if
449+
you want to write ``NULL`` instead of using default values
450+
for some columns, you can set
451+
``default_missing_value_interpretation`` to
452+
``DEFAULT_VALUE`` and at the same time, set
453+
``missing_value_interpretations`` to ``NULL_VALUE`` on those
454+
columns.
441455
"""
442456

443457
class MissingValueInterpretation(proto.Enum):
@@ -521,6 +535,11 @@ class ProtoData(proto.Message):
521535
number=7,
522536
enum=MissingValueInterpretation,
523537
)
538+
default_missing_value_interpretation: MissingValueInterpretation = proto.Field(
539+
proto.ENUM,
540+
number=8,
541+
enum=MissingValueInterpretation,
542+
)
524543

525544

526545
class AppendRowsResponse(proto.Message):
@@ -825,7 +844,7 @@ class StorageErrorCode(proto.Enum):
825844
customer-managed encryption key.
826845
KMS_SERVICE_ERROR (13):
827846
Key Management Service (KMS) service returned
828-
an error.
847+
an error, which can be retried.
829848
KMS_PERMISSION_DENIED (14):
830849
Permission denied while using
831850
customer-managed encryption key.

google/cloud/bigquery_storage_v1beta2/services/big_query_write/async_client.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,13 @@
5757

5858
class BigQueryWriteAsyncClient:
5959
"""BigQuery Write API.
60+
6061
The Write API can be used to write data to BigQuery.
62+
63+
The `google.cloud.bigquery.storage.v1
64+
API </bigquery/docs/reference/storage/rpc/google.cloud.bigquery.storage.v1>`__
65+
should be used instead of the v1beta2 API for BigQueryWrite
66+
operations.
6167
"""
6268

6369
_client: BigQueryWriteClient

google/cloud/bigquery_storage_v1beta2/services/big_query_write/client.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,13 @@ def get_transport_class(
9494

9595
class BigQueryWriteClient(metaclass=BigQueryWriteClientMeta):
9696
"""BigQuery Write API.
97+
9798
The Write API can be used to write data to BigQuery.
99+
100+
The `google.cloud.bigquery.storage.v1
101+
API </bigquery/docs/reference/storage/rpc/google.cloud.bigquery.storage.v1>`__
102+
should be used instead of the v1beta2 API for BigQueryWrite
103+
operations.
98104
"""
99105

100106
@staticmethod

google/cloud/bigquery_storage_v1beta2/services/big_query_write/transports/grpc.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,14 @@ class BigQueryWriteGrpcTransport(BigQueryWriteTransport):
3333
"""gRPC backend transport for BigQueryWrite.
3434
3535
BigQuery Write API.
36+
3637
The Write API can be used to write data to BigQuery.
3738
39+
The `google.cloud.bigquery.storage.v1
40+
API </bigquery/docs/reference/storage/rpc/google.cloud.bigquery.storage.v1>`__
41+
should be used instead of the v1beta2 API for BigQueryWrite
42+
operations.
43+
3844
This class defines the same methods as the primary client, so the
3945
primary client can load the underlying transport implementation
4046
and call it.

google/cloud/bigquery_storage_v1beta2/services/big_query_write/transports/grpc_asyncio.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,14 @@ class BigQueryWriteGrpcAsyncIOTransport(BigQueryWriteTransport):
3434
"""gRPC AsyncIO backend transport for BigQueryWrite.
3535
3636
BigQuery Write API.
37+
3738
The Write API can be used to write data to BigQuery.
3839
40+
The `google.cloud.bigquery.storage.v1
41+
API </bigquery/docs/reference/storage/rpc/google.cloud.bigquery.storage.v1>`__
42+
should be used instead of the v1beta2 API for BigQueryWrite
43+
operations.
44+
3945
This class defines the same methods as the primary client, so the
4046
primary client can load the underlying transport implementation
4147
and call it.

scripts/fixup_bigquery_storage_v1_keywords.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def partition(
3939
class bigquery_storageCallTransformer(cst.CSTTransformer):
4040
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
4141
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
42-
'append_rows': ('write_stream', 'offset', 'proto_rows', 'trace_id', 'missing_value_interpretations', ),
42+
'append_rows': ('write_stream', 'offset', 'proto_rows', 'trace_id', 'missing_value_interpretations', 'default_missing_value_interpretation', ),
4343
'batch_commit_write_streams': ('parent', 'write_streams', ),
4444
'create_read_session': ('parent', 'read_session', 'max_stream_count', 'preferred_min_stream_count', ),
4545
'create_write_stream': ('parent', 'write_stream', ),

0 commit comments

Comments
 (0)