normalize firestoreIO - #39941
Conversation
|
Same as other IOs, we should be able to add a basic integration test (e.g. in extended tests), one can use 'firestoredb' as default firestore database, like other tests did |
|
Run Yaml_Xlang_Direct PostCommit databases |
d603fd3 to
694eca0
Compare
080f6bc to
6de4303
Compare
|
cc: @Abacn |
| @@ -535,6 +535,7 @@ def get_portability_package_data(): | |||
| # errors raised during async flushes instead of swallowing them. | |||
| 'google-cloud-bigtable>=2.42.0,<3', | |||
| 'google-cloud-build>=3.35.0,<4', | |||
| 'google-cloud-firestore>=2.0.0,<3', | |||
There was a problem hiding this comment.
This is only used in tests. Consider put it into 'test' extra and make the import optional in integration_tests.py
There was a problem hiding this comment.
I tried moving it to the test extra and made the import optional in integration_tests.py
but with it in test, plain [test] tox envs pull in google-cloud-core without google.cloud.storage and GCS / BigQuery dataframe tests start failing (ModuleNotFoundError: google.cloud.storage, etc.)
so I kept the optional import, but left the package under gcp next to the other GCP test clients (bigtable/spanner), or do you suggest another splitting approach?
|
Assigning reviewers: R: @shunping for label python. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
fixes: #28688
Adds Java SchemaTransform providers for Firestore read and write so Firestore can be used from Beam YAML
Read (firestore_read:v1) lists documents from a collection and outputs Beam Rows using a JSON schema. Write (firestore_write:v1) takes Rows and upserts them with batchWrite. FirestoreUtils handles document toRow conversion, with config classes for both sides.
Registers ReadFromFirestore and WriteToFirestore in standard_io.yaml, pointing at the GCP expansion service jar.
Unit tests: FirestoreSchemaTransformProviderTest and FirestoreUtilsTest.
I validated locally:
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.mdwith 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.