Add Go example for schema-transform nested field access#37543
Add Go example for schema-transform nested field access#37543MemonaAmirAbdulHaq wants to merge 2 commits intoapache:masterfrom
Conversation
Summary of ChangesHello @MemonaAmirAbdulHaq, 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 enhances the Apache Beam documentation for Go developers by providing a concrete example of how to utilize schema-transform features for nested field access. The update clarifies the process of working with schema-aware PCollections in Go, making the documentation more practical and up-to-date. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
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 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 counter productive. 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. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Assigning reviewers: R: @Abacn for label website. 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). |
|
Hi @Abacn Can you review it |
|
Hi @damccorm, please have a look at this PR, if you got some time, thanks. |
|
|
||
| A schema on a `PCollection` enables a rich variety of relational transforms. The fact that each record is composed of | ||
| named fields allows for simple and readable aggregations that reference fields by name, similar to the aggregations in | ||
| a SQL expression. |
| postCodes := beam.ParDo(s, func(p Purchase) string { | ||
| return p.ShippingAddress.PostCode | ||
| }, purchases) | ||
| {{< /highlight >}} |
There was a problem hiding this comment.
Instead of dropping this into the top level section, we should follow the same pattern used by the other languages
| }, | ||
| ) | ||
| postCodes := beam.ParDo(s, func(p Purchase) string { | ||
| return p.ShippingAddress.PostCode |
There was a problem hiding this comment.
This just shows how you can access fields of a Go object, it seems unrelated to schemas
There was a problem hiding this comment.
Thanks for the feedback. I've restored the original schema description .
|
Reminder, please take a look at this pr: @Abacn |
|
Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment R: @damccorm for label website. Available commands:
|
|
Reminder, please take a look at this pr: @damccorm |
|
Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment R: @kennknowles for label website. Available commands:
|
|
R: @damccorm |
|
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment |
|
|
||
| {{< paragraph class="language-go">}} | ||
| Beam does not yet support Schema transforms natively in Go. However, it will be implemented with the following behavior. | ||
| Support for Schema Transforms hasn't been developed for the Go SDK yet. |
There was a problem hiding this comment.
This currently just changes the wording, it does not address the issue
|
waiting on author |
Description:
This PR adds a Go example demonstrating how to access nested fields using the schema-transform feature in Apache Beam. It updates the documentation in programming-guide.md with a practical example for Go developers.
Changes included
- Added a Go code snippet showing nested field access.
- Improved explanations for clarity in the Go section of the schema-transform guide.
Why this is useful