Skip to content

Add Bigtable CDC YAML SchemaTransform - #40261

Open
Amar3tto wants to merge 10 commits into
masterfrom
bigtable-cdc-yaml
Open

Amar3tto wants to merge 10 commits into
masterfrom
bigtable-cdc-yaml

Conversation

@Amar3tto

@Amar3tto Amar3tto commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Adds YAML support for reading Google Cloud Bigtable change streams.

This PR:

  • adds a Bigtable CDC SchemaTransform provider
  • converts ChangeStreamMutation records to Beam Rows
  • supports SetCell, DeleteCells, DeleteFamily, AddToCell, and MergeToCell entries
  • registers ReadFromBigtableCDC in standard_io.yaml
  • adds unit tests for configuration and mutation entry conversion

Tested with:

./gradlew :sdks:java:io:google-cloud-platform:test \
  --tests org.apache.beam.sdk.io.gcp.bigtable.changestreams.BigtableChangeStreamReadSchemaTransformProviderTest

Successful run: https://github.com/apache/beam/actions/runs/35729484761


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.

@Amar3tto Amar3tto changed the title Bigtable CDC yaml Add Bigtable CDC YAML SchemaTransform Sep 24, 2026
@Amar3tto
Amar3tto requested a review from Abacn September 24, 2026 12:49
@Amar3tto
Amar3tto marked this pull request as ready for review October 6, 2026 08:04
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Reminder, please take a look at this pr: @Abacn

@damccorm

damccorm commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Load balancing out some reviews.

R: @derrickaw

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

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

Comment thread sdks/python/apache_beam/yaml/integration_tests.py
@derrickaw

Copy link
Copy Markdown
Collaborator

R: @ahmedabu98, can you take a quick peek at this to see if anything else is missing? Thanks

@ahmedabu98 ahmedabu98 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good from a skim, just consider adding a flattened output option.

Also please add a YAML IT

.addNullableRowField("value_input", VALUE_SCHEMA)
.build();

static final Schema CHANGE_STREAM_MUTATION_SCHEMA =

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This output schema looks complex, which will be noticed when using it with YAML.

In the regular BigtableReadSchemaTransformProvider, we added an option to use a flattened schema (one output per entry, instead of per mutation). Consider doing something similar here

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done

@ahmedabu98

Copy link
Copy Markdown
Contributor

cc @mutianf might be relevant for you

@Amar3tto

Copy link
Copy Markdown
Collaborator Author

please add a YAML IT

I tried adding a Bigtable CDC YAML IT using a temporary change-stream-enabled table and a bounded end time, but the pipeline consistently times out in the YAML Direct/FnApi integration-test harness.

Do you have a recommendation for how this integration test should be structured for a streaming CDC source? ReadFromSpannerCDC seems to have a similar setup, but I couldn't find a YAML IT for it either.

@Amar3tto
Amar3tto requested a review from ahmedabu98 October 20, 2026 09:34
@github-actions github-actions Bot added the build label Oct 20, 2026
@mutianf

mutianf commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

@jackdingilian

@derrickaw

Copy link
Copy Markdown
Collaborator

LGTM for yaml, @ahmedabu98 - did you want to take one more peek? Thanks

@ahmedabu98

Copy link
Copy Markdown
Contributor

but the pipeline consistently times out in the YAML Direct/FnApi integration-test harness

Hmm why is it timing out? does this mean the end_at_timestamp config option doesn't work?

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.

5 participants