-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Add documentation and examples for SQL calcite_connection… #36684
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
base: master
Are you sure you want to change the base?
Conversation
…_properties - Add example YAML pipeline showing how to provide calcite_connection_properties in sdks/python/apache_beam/yaml/examples/transforms/sql/calcite_connection_properties.yaml - Update YAML docs generator to include callout on SQL transform page explaining how to use calcite_connection_properties via options: key - Shows both YAML mapping and JSON string approaches for compatibility This addresses the issue where users had difficulty knowing how to specify calcite_connection_properties for SQL transforms in YAML pipelines. The transform catalog will now include examples and clear guidance.
Summary of ChangesHello @cipheraxat, 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 improves the usability of Beam YAML for SQL transforms by adding comprehensive documentation and an example for "calcite_connection_properties". This ensures users can easily configure dialect-specific SQL functions, with clear guidance on using both YAML mapping and JSON string formats for these properties, thereby enhancing pipeline flexibility and clarity. 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 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
|
|
@cipheraxat – Just curious what Beam issue this PR closes? |
|
@mohamedawnallah - This is the issue : #36614 |
Let's add in the PR description "Closes #36614". That way the reviewers and people seeing PR becomes clear what it closes. Also it would be nice for that issue to be automatically closed when that PR is merged |
|
And seems formatting workflows complains. This can be done by following the |
|
It would be nice as well to state how someone's supposed to test this (any unit/integration tests) and/or if it is tested automatically in the CI? |
Let me know if you need any helping hands regards that |
|
Sure @mohamedawnallah, let me check through formatting issues. I will reach out if I am stuck anywhere. |
|
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment |
|
Assigning reviewers: R: @jrmccluskey 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). |
|
waiting on author |
|
On initial glance, It looks like we need to register the example YAML file name as processor in Where It is Created: beam/sdks/python/apache_beam/yaml/examples/transforms/blueprint/sqlserver_to_bigquery.yaml Lines 18 to 58 in 1e51a88
Where It is Registered: beam/sdks/python/apache_beam/yaml/examples/testing/examples_test.py Lines 915 to 926 in 1e51a88
Relatedly: |
Issue Components closes #36614
Changes Made
Added example YAML pipeline in `sdks/python/apache_beam/yaml/examples/transforms/sql/calcite_connection_properties.yaml`
Updated YAML docs generator in `sdks/python/apache_beam/yaml/generate_yaml_docs.py`
Example Usage
Preferred YAML mapping approach:
```yaml
options:
calcite_connection_properties:
fun: postgresql
```
Alternative JSON string approach:
```yaml
options:
calcite_connection_properties: '{"fun": "postgresql"}'
```
Testing