-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Enable BigQuery CDC configuration for Python BigQuery sink #32529
Enable BigQuery CDC configuration for Python BigQuery sink #32529
Conversation
fixes #32527 |
I have a question @ahmedabu98, how to make sure the xlang tests for BQ have run? This branch test output for the test looks pretty similar to those that ran in master the last time, but in both cases it seems that the BQ StorageWrite transform is not being registered. Am I looking at the right place or are the IT for xlang run in some other different task? |
The test you are referencing is to generate wrappers for external transforms (unrelated here since this wrapper is handwritten). The workflows testing GCP xlang IOs are in beam_PostCommit_Python_Xlang_Gcp_Dataflow and beam_PostCommit_Python_Xlang_Gcp_Direct. These are post commits so to trigger them you just need to modify their respective target files and push it to this branch: |
…plemented table constraint support on the bigquery fake dataset services
Run Java_GCP_IO_Direct PreCommit |
Run Java_Examples_Dataflow PreCommit |
FYI @prodriguezdefino we migrated our tests from Jenkins to Github Actions, so tests aren't triggered by comments anymore. I re-ran the Java examples workflow from my side Check out https://github.com/apache/beam/tree/master/.github/workflows#readme for more info |
@ahmedabu98 thanks for launching the test run. I think I covered the previous comments on the PR, do you think is ready or it needs more work? |
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.
It's almost there, just a few more things.
Sorry for all the back and forth 😅
...pache/beam/sdk/io/gcp/bigquery/providers/BigQueryStorageWriteApiSchemaTransformProvider.java
Outdated
Show resolved
Hide resolved
...pache/beam/sdk/io/gcp/bigquery/providers/BigQueryStorageWriteApiSchemaTransformProvider.java
Show resolved
Hide resolved
...pache/beam/sdk/io/gcp/bigquery/providers/BigQueryStorageWriteApiSchemaTransformProvider.java
Outdated
Show resolved
Hide resolved
…n tests, included the CDC configurations into the existing RowDynamicDestinations object, improved error message for mutation information schema checks.
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.
LGTM
Thanks for your patience and sticking this one out @prodriguezdefino, looking forward to users trying this out :)
Before I merge, can we add a line to CHANGES.md calling out this new feature? (make sure to mention it's specifically for storage write api's at-least-once mode) |
Added the changes here: #32788 (less tests that need to pass for the change). Thanks for the review! |
SGTM, merging |
Enables the configuration of CDC writes into a BigQuery table by setting the primary key columns to be used in the row mutations. This change adds the configuration of CDC usage for the
BigQueryStorageWriteApiSchemaTransformProvider
.By setting
configuration.setUseCDCWritesWithPrimaryKey(List.of("col1", "col2"))
on the provider's config, the transform creation will create aBigQuery.Write<Row>
transform that will configure the right row mutation information by checking for a Row schema like:The implementation also enables the possibility of setting a dynamic destination alongside with CDC usage by using this Row schema:
Note: In case of using dynamic destination and CDC is only supported when all the destination share the same primary key columns.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
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, commentfixes #<ISSUE NUMBER>
instead.CHANGES.md
with noteworthy changes.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)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.