feat(Spanner): Live Migration: Remove generated columns from change events during transformation and add tests for this behavior#3255
Merged
pratickchokhani merged 1 commit intoGoogleCloudPlatform:mainfrom Feb 20, 2026
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3255 +/- ##
============================================
+ Coverage 51.05% 55.28% +4.22%
+ Complexity 5212 2291 -2921
============================================
Files 994 492 -502
Lines 60723 28947 -31776
Branches 6657 3076 -3581
============================================
- Hits 31000 16002 -14998
+ Misses 27543 11966 -15577
+ Partials 2180 979 -1201
🚀 New features to boost your workflow:
|
95666a2 to
928a20e
Compare
dc66812 to
8c90808
Compare
e7cdb2d to
34ec316
Compare
34ec316 to
5fba3d2
Compare
cd4c9b0 to
26dbfd4
Compare
Contributor
shreyakhajanchi
left a comment
There was a problem hiding this comment.
Added some comments. Please add details of manual test run in the description for completeness.
...spanner/src/main/java/com/google/cloud/teleport/v2/templates/spanner/ShadowTableCreator.java
Outdated
Show resolved
Hide resolved
...nner/src/main/java/com/google/cloud/teleport/v2/templates/datastream/ChangeEventContext.java
Show resolved
Hide resolved
...nner/src/main/java/com/google/cloud/teleport/v2/templates/datastream/ChangeEventContext.java
Show resolved
Hide resolved
...anner/src/main/java/com/google/cloud/teleport/v2/templates/SpannerTransactionWriterDoFn.java
Outdated
Show resolved
Hide resolved
...st/java/com/google/cloud/teleport/v2/templates/transform/ChangeEventTransformerDoFnTest.java
Show resolved
Hide resolved
v2/datastream-to-spanner/src/test/resources/MySQLDataTypesIT/mysql-generated-col.sql
Show resolved
Hide resolved
...com/google/cloud/teleport/v2/templates/MySQLDatastreamToSpannerDataTypesAndExpressionIT.java
Show resolved
Hide resolved
...ava/com/google/cloud/teleport/v2/spanner/migrations/convertors/ChangeEventTypeConvertor.java
Outdated
Show resolved
Hide resolved
785f60e to
4a1f40c
Compare
…nsformation and add tests for this behavior.
4a1f40c to
385cdaa
Compare
76ecc67
into
GoogleCloudPlatform:main
28 of 29 checks passed
joy91227
pushed a commit
to joy91227/DataflowTemplates
that referenced
this pull request
Mar 4, 2026
…nsformation and add tests for this behavior. (GoogleCloudPlatform#3255)
This file contains hidden or 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
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.
If a primary is Generated Column within Spanner and the change stream event is DELETE, then DML will be used
Else Mutation is used.
For DML, we include all the non-generated columns in the where clause. This is so because we do not have the list of dependent columns.
If column is Generated Column in Spanner, then the column is omitted from both DML or Mutations.