Skip to content

Adding GCP Spanner Change Stream support for Python#35453

Merged
damccorm merged 7 commits intoapache:masterfrom
flpablo:master
Aug 7, 2025
Merged

Adding GCP Spanner Change Stream support for Python#35453
damccorm merged 7 commits intoapache:masterfrom
flpablo:master

Conversation

@flpablo
Copy link
Contributor

@flpablo flpablo commented Jun 26, 2025

Adding GCP Spanner Change Stream support for python (fixes #24103).

This update enables reading from Spanner Change Streams using apache_beam.io.gcp.spanner by incorporating cross-language transforms from the Beam Java SDK. The function outputs a JSON string of com.google.cloud.spanner.DataChangeRecord, which is necessary as DataChangeRecords are not yet directly supported, and existing solutions (like PubSub) rely on this string format.

Required parameters include instance_id, database_id, project_id, changeStreamName, inclusiveStartAt, metadataDatabase, and metadataInstance.

These changes align with the existing development for ReadFromSpanner and WriteToSpannerSchema within apache_beam.io.gcp.spanner.

Added unit test for the cross-language support for Spanner Change Stream.


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@github-actions
Copy link
Contributor

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

@flpablo
Copy link
Contributor Author

flpablo commented Jun 27, 2025

assign set of reviewers

@github-actions
Copy link
Contributor

Assigning reviewers:

R: @damccorm for label python.
R: @m-trieu for label java.
R: @nielm for label spanner.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@github-actions
Copy link
Contributor

Reminder, please take a look at this pr: @damccorm @m-trieu @nielm

@github-actions
Copy link
Contributor

Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment assign to next reviewer:

R: @jrmccluskey for label python.
R: @kennknowles for label java.
R: @nielm for label spanner.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

@github-actions
Copy link
Contributor

Reminder, please take a look at this pr: @jrmccluskey @kennknowles @nielm

@damccorm
Copy link
Contributor

@nielm could you please take a look at this one?

@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2025

Reminder, please take a look at this pr: @jrmccluskey @kennknowles @nielm

@github-actions
Copy link
Contributor

github-actions bot commented Aug 6, 2025

Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment assign to next reviewer:

R: @tvalentyn for label python.
R: @chamikaramj for label java.
R: @nielm for label spanner.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

@tvalentyn
Copy link
Contributor

R: @nielm

@tvalentyn
Copy link
Contributor

stop reviewer notifications

@github-actions
Copy link
Contributor

github-actions bot commented Aug 6, 2025

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment assign set of reviewers

@github-actions
Copy link
Contributor

github-actions bot commented Aug 6, 2025

Stopping reviewer notifications for this pull request: requested by reviewer. If you'd like to restart, comment assign set of reviewers

@nielm
Copy link
Contributor

nielm commented Aug 6, 2025

Sorry for the delay in getting to this.

Can you confirm that you have manually run integration tests on this?

@nielm
Copy link
Contributor

nielm commented Aug 6, 2025

assign set of reviewers

@github-actions
Copy link
Contributor

github-actions bot commented Aug 6, 2025

Assigning reviewers:

R: @damccorm for label python.
R: @kennknowles for label java.
R: @nielm for label spanner.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@nielm
Copy link
Contributor

nielm commented Aug 6, 2025

LGTM

@nielm
Copy link
Contributor

nielm commented Aug 6, 2025

assign to next reviewer

Copy link
Contributor

@nielm nielm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

(again in the hope that PR-bot assigns the next reviewer in the chain...)

Copy link
Contributor

@damccorm damccorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@damccorm damccorm merged commit 7c2b57e into apache:master Aug 7, 2025
102 checks passed
parveensania pushed a commit to parveensania/beam-dp that referenced this pull request Aug 17, 2025
* Adding Spanner Change Stream support to python.

* Updating CHANGES.md

* Fixing python format

* Modify CHANGES.md

* Restarting Tests

* Retesting
flpablo added a commit to flpablo/beam that referenced this pull request Sep 2, 2025
Fix: Correctly assign feature to release. apache#35453
liferoad pushed a commit that referenced this pull request Sep 2, 2025
Fix: Correctly assign feature to release. #35453
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants