-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add rowRestriction when fetching BQ schema #2273
base: main
Are you sure you want to change the base?
Conversation
Thanks for the fix @joy91227 , and it looks promising to me. Could you also add a test to verify that it works? |
Codecov ReportAttention: Patch coverage is
❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #2273 +/- ##
=========================================
Coverage 48.97% 48.97%
Complexity 4515 4515
=========================================
Files 911 911
Lines 55232 55234 +2
Branches 5892 5893 +1
=========================================
+ Hits 27051 27053 +2
+ Misses 26263 26262 -1
- Partials 1918 1919 +1
🚀 New features to boost your workflow:
|
The integration test involves creating a time partitioned table. Currently BigqueryResourceManager, the testing util in Beam for BQ tables, does not support this. I opened a PR to add this feature |
Issue: When using the BQ to Parquet flex template on partitioned BQ tables, we encounter error [2]
Analysis:
[1] https://cloud.google.com/java/docs/reference/google-cloud-bigquerystorage/3.11.4/com.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.Builder#com_google_cloud_bigquery_storage_v1_ReadSession_TableReadOptions_Builder_setRowRestriction_java_lang_String_
[2] INVALID_ARGUMENT: request failed: Query error: Cannot query over table 'xxxx' without a filter over column(s) 'xxxx' that can be used for partition elimination
[3]
... at com.google.cloud.bigquery.storage.v1beta1.BigQueryStorageClient.createReadSession(BigQueryStorageClient.java:239)
.... at com.google.cloud.teleport.v2.templates.BigQueryToParquet.run(BigQueryToParquet.java:253)