Repository navigation
Conversation
Resolve the BigQuery schema on workers, so that starting the template no longer requires a launcher-side BigQuery dry-run or BigQuery permissions on the launch identity. `BigQueryRowParser` converts records using the `TableSchema` supplied by the reader at execution time. `RuntimeSchemaRowCoder` carries that schema with each element, encoding it with Beam's portable schema protobuf and caching it in an LRU fashion. The pipeline propagates the coder with `setCoder` instead of `setRowSchema`.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refactors the BigQuery data ingestion process to resolve schemas at execution time on workers rather than at pipeline construction time. By moving schema resolution to the worker, the pipeline no longer requires a launcher-side dry-run, which removes the need for BigQuery permissions on the launch identity. This is achieved through a custom row parser and a new coder that carries the schema with each element, significantly enhancing the flexibility and security of the BigQuery-to-Neo4j integration. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces BigQueryRowParser and RuntimeSchemaRowCoder to resolve and carry BigQuery schemas at pipeline execution time on the workers, removing the need for launcher-side BigQuery connectivity. Feedback focuses on optimizing RuntimeSchemaRowCoder to prevent severe global lock contention under high throughput by replacing the synchronized LinkedHashMap caches with ConcurrentHashMap and a custom size-limiting eviction helper. Additionally, it is recommended to simplify the stream reading in readFully using Guava's ByteStreams.readFully utility.
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (62.50%) 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 #4638 +/- ##
=============================================
+ Coverage 37.79% 59.73% +21.94%
- Complexity 521 7936 +7415
=============================================
Files 197 1125 +928
Lines 12031 72803 +60772
Branches 1238 8857 +7619
=============================================
+ Hits 4547 43489 +38942
- Misses 7110 26412 +19302
- Partials 374 2902 +2528
🚀 New features to boost your workflow:
|
nord-erik
left a comment
There was a problem hiding this comment.
lgtm at least, but gemini might have some quick wins
Resolve the BigQuery schema on workers, so that starting the template no longer requires a launcher-side BigQuery dry-run or BigQuery permissions on the launch identity.
BigQueryRowParserconverts records using theTableSchemasupplied by the reader at execution time.RuntimeSchemaRowCodercarries that schema with each element, encoding it with Beam's portable schema protobuf and caching it in an LRU fashion. The pipeline propagates the coder withsetCoderinstead ofsetRowSchema.