From ac6d9126413b5c8e2b00727f7d74f03b7fb9d9ed Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 2 Dec 2023 11:31:49 -0500 Subject: [PATCH] feat: add `use_table_schema` field to BigQueryConfig (#1035) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add `use_table_schema` field to BigQueryConfig PiperOrigin-RevId: 587079085 Source-Link: https://github.com/googleapis/googleapis/commit/95fabe6ae89c9206e89fd38a4d5c0f40c13bedfb Source-Link: https://github.com/googleapis/googleapis-gen/commit/90b35e9d8bc6780a80db3bababefc29072fa3506 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTBiMzVlOWQ4YmM2NzgwYTgwZGIzYmFiYWJlZmMyOTA3MmZhMzUwNiJ9 * 🦉 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 --- google/pubsub_v1/types/pubsub.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/google/pubsub_v1/types/pubsub.py b/google/pubsub_v1/types/pubsub.py index d44778dd..ff7becd4 100644 --- a/google/pubsub_v1/types/pubsub.py +++ b/google/pubsub_v1/types/pubsub.py @@ -1111,8 +1111,9 @@ class BigQueryConfig(proto.Message): The name of the table to which to write data, of the form {projectId}.{datasetId}.{tableId} use_topic_schema (bool): - When true, use the topic's schema as the - columns to write to in BigQuery, if it exists. + Optional. When true, use the topic's schema as the columns + to write to in BigQuery, if it exists. ``use_topic_schema`` + and ``use_table_schema`` cannot be enabled at the same time. write_metadata (bool): When true, write the subscription name, message_id, publish_time, attributes, and ordering_key to additional @@ -1131,6 +1132,10 @@ class BigQueryConfig(proto.Message): Output only. An output-only field that indicates whether or not the subscription can receive messages. + use_table_schema (bool): + Optional. When true, use the BigQuery table's schema as the + columns to write to in BigQuery. ``use_table_schema`` and + ``use_topic_schema`` cannot be enabled at the same time. """ class State(proto.Enum): @@ -1186,6 +1191,10 @@ class State(proto.Enum): number=5, enum=State, ) + use_table_schema: bool = proto.Field( + proto.BOOL, + number=6, + ) class CloudStorageConfig(proto.Message):