-
Notifications
You must be signed in to change notification settings - Fork 967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support populating Spanner source database id, instance id and a custom metadata field in Spanner CDC to Pub Sub template #1769
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ShuranZhang
force-pushed
the
PopulateDbName
branch
from
August 2, 2024 20:41
e60030f
to
dda65b5
Compare
tianz101
reviewed
Aug 5, 2024
.../src/main/java/com/google/cloud/teleport/v2/options/SpannerChangeStreamsToPubSubOptions.java
Outdated
Show resolved
Hide resolved
tianz101
reviewed
Aug 5, 2024
...loud/src/main/java/com/google/cloud/teleport/v2/transforms/WriteDataChangeRecordsToAvro.java
Show resolved
Hide resolved
tianz101
reviewed
Aug 5, 2024
...loud/src/main/java/com/google/cloud/teleport/v2/transforms/WriteDataChangeRecordsToAvro.java
Show resolved
Hide resolved
ShuranZhang
force-pushed
the
PopulateDbName
branch
from
August 7, 2024 19:24
d9925bf
to
c2affde
Compare
ShuranZhang
force-pushed
the
PopulateDbName
branch
from
September 5, 2024 23:50
c2affde
to
0117dba
Compare
ShuranZhang
changed the title
Support populating Spanner source database and instance id in Spanner CDC to Pub Sub template
Support populating Spanner source database id, instance id and a custom metadata field in Spanner CDC to Pub Sub template
Sep 6, 2024
tianz101
approved these changes
Sep 6, 2024
...a/com/google/cloud/teleport/v2/transforms/FileFormatFactorySpannerChangeStreamsToPubSub.java
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1769 +/- ##
============================================
+ Coverage 43.28% 43.33% +0.04%
- Complexity 3514 3515 +1
============================================
Files 832 832
Lines 48553 48647 +94
Branches 5222 5235 +13
============================================
+ Hits 21016 21080 +64
- Misses 25848 25874 +26
- Partials 1689 1693 +4
|
Abacn
approved these changes
Sep 11, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approval based on passed tests
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduce two new options for Spanner Change Streams to Pub/Sub template.
includeSpannerSource
: boolean option default to false.If this config is set to true, two new fields
spannerDatabaseId
andspannerInstanceId
will be populated to the message data field with the associate values.outputMessageData
: string option default to empty.If this config has non-empty string value, the string value will be populated to the
outputMessageMetadata
field in output pub sub message body.I verified correctness for both AVRO and JSON data formats through integration tests in
SpannerChangeStreamsToPubSubIT.java
.