Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

feat: Add WriteDisposition to BigQuery Export API #107

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,19 @@ class ExportInsightsDataRequest(proto.Message):
A fully qualified KMS key name for BigQuery
tables protected by CMEK. Format:
projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/cryptoKeyVersions/{version}
write_disposition (google.cloud.contact_center_insights_v1.types.ExportInsightsDataRequest.WriteDisposition):
Options for what to do if the destination
table already exists.
"""

class WriteDisposition(proto.Enum):
r"""Specifies the action that occurs if the destination table
already exists.
"""
WRITE_DISPOSITION_UNSPECIFIED = 0
WRITE_TRUNCATE = 1
WRITE_APPEND = 2

class BigQueryDestination(proto.Message):
r"""A BigQuery Table Reference.

Expand Down Expand Up @@ -486,6 +497,7 @@ class BigQueryDestination(proto.Message):
parent = proto.Field(proto.STRING, number=1,)
filter = proto.Field(proto.STRING, number=3,)
kms_key = proto.Field(proto.STRING, number=4,)
write_disposition = proto.Field(proto.ENUM, number=5, enum=WriteDisposition,)


class ExportInsightsDataMetadata(proto.Message):
Expand Down
2 changes: 1 addition & 1 deletion scripts/fixup_contact_center_insights_v1_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class contact_center_insightsCallTransformer(cst.CSTTransformer):
'delete_issue_model': ('name', ),
'delete_phrase_matcher': ('name', ),
'deploy_issue_model': ('name', ),
'export_insights_data': ('parent', 'big_query_destination', 'filter', 'kms_key', ),
'export_insights_data': ('parent', 'big_query_destination', 'filter', 'kms_key', 'write_disposition', ),
'get_analysis': ('name', ),
'get_conversation': ('name', 'view', ),
'get_issue': ('name', ),
Expand Down