feat: add the Gemini Data Analytics (GDA) integration for DB NL2SQL conversion to Toolbox#2181
Conversation
Summary of ChangesHello @wangauone, 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 significantly enhances the Toolbox by adding a new capability to convert natural language queries into SQL statements using the Gemini Data Analytics API. This feature is exposed through a new configurable source and a powerful query tool, expanding the platform's ability to interact with various Google Cloud databases like AlloyDB, Spanner, and CloudSQL, making data interaction more intuitive for users. Highlights
Ignored Files
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
|
There was a problem hiding this comment.
Code Review
This pull request introduces an integration for Gemini Data Analytics (GDA), allowing natural language queries to be converted to SQL. The changes include a new source, a new tool, corresponding documentation, and tests. The implementation is solid, but I've found a minor issue in the source implementation regarding user agent handling where an error is ignored and a value is refetched unnecessarily. I've provided a suggestion to improve the robustness and efficiency of this part.
g-lynnzee
left a comment
There was a problem hiding this comment.
What kind of E2E testing have we done on this tool?
The tests has been done on CloudSQL, Spanner, and AlloyDB with both ADC and Client-side OAuth via CURL like Gemini CLI integration with the Toolbox is also done. |
Yuan325
left a comment
There was a problem hiding this comment.
Please let me know if you need more clarifications, thank you! :)
Thanks Yuan. All updated. Please have another check. |
|
🧨 Preview deployments removed. |
…NL2SQL conversion to Toolbox (#2181) ## Description This PR is to add the Gemini Data Analytics (GDA) integration for DB NL2SQL conversion to Toolbox. It allows the user to convert a natural language query to SQL statement based on their database instance. See the doc section for details. ## PR Checklist > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change 🛠️ Fixes #2180 --------- Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> aa270b2
…NL2SQL conversion to Toolbox (googleapis#2181) ## Description This PR is to add the Gemini Data Analytics (GDA) integration for DB NL2SQL conversion to Toolbox. It allows the user to convert a natural language query to SQL statement based on their database instance. See the doc section for details. ## PR Checklist > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change 🛠️ Fixes googleapis#2180 --------- Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> aa270b2
🤖 I have created a release *beep* *boop* --- ## [0.24.0](v0.23.0...v0.24.0) (2025-12-19) ### Features * **sources/cloud-gemini-data-analytics:** Add the Gemini Data Analytics (GDA) integration for DB NL2SQL conversion to Toolbox ([#2181](#2181)) ([aa270b2](aa270b2)) * **source/cloudsqlmysql:** Add support for IAM authentication in Cloud SQL MySQL source ([#2050](#2050)) ([af3d3c5](af3d3c5)) * **sources/oracle:** Add Oracle OCI and Wallet support ([#1945](#1945)) ([8ea39ec](8ea39ec)) * Support combining prebuilt and custom tool configurations ([#2188](#2188)) ([5788605](5788605)) * **tools/mysql-get-query-plan:** Add new `mysql-get-query-plan` tool for MySQL source ([#2123](#2123)) ([0641da0](0641da0)) ### Bug Fixes * **spanner:** Move list graphs validation to runtime ([#2154](#2154)) ([914b3ee](914b3ee)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [0.24.0](v0.23.0...v0.24.0) (2025-12-19) ### Features * **sources/cloud-gemini-data-analytics:** Add the Gemini Data Analytics (GDA) integration for DB NL2SQL conversion to Toolbox ([#2181](#2181)) ([aa270b2](aa270b2)) * **source/cloudsqlmysql:** Add support for IAM authentication in Cloud SQL MySQL source ([#2050](#2050)) ([af3d3c5](af3d3c5)) * **sources/oracle:** Add Oracle OCI and Wallet support ([#1945](#1945)) ([8ea39ec](8ea39ec)) * Support combining prebuilt and custom tool configurations ([#2188](#2188)) ([5788605](5788605)) * **tools/mysql-get-query-plan:** Add new `mysql-get-query-plan` tool for MySQL source ([#2123](#2123)) ([0641da0](0641da0)) ### Bug Fixes * **spanner:** Move list graphs validation to runtime ([#2154](#2154)) ([914b3ee](914b3ee)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> f520b4e
🤖 I have created a release *beep* *boop* --- ## [0.24.0](googleapis/mcp-toolbox@v0.23.0...v0.24.0) (2025-12-19) ### Features * **sources/cloud-gemini-data-analytics:** Add the Gemini Data Analytics (GDA) integration for DB NL2SQL conversion to Toolbox ([googleapis#2181](googleapis#2181)) ([aa270b2](googleapis@aa270b2)) * **source/cloudsqlmysql:** Add support for IAM authentication in Cloud SQL MySQL source ([googleapis#2050](googleapis#2050)) ([af3d3c5](googleapis@af3d3c5)) * **sources/oracle:** Add Oracle OCI and Wallet support ([googleapis#1945](googleapis#1945)) ([8ea39ec](googleapis@8ea39ec)) * Support combining prebuilt and custom tool configurations ([googleapis#2188](googleapis#2188)) ([5788605](googleapis@5788605)) * **tools/mysql-get-query-plan:** Add new `mysql-get-query-plan` tool for MySQL source ([googleapis#2123](googleapis#2123)) ([0641da0](googleapis@0641da0)) ### Bug Fixes * **spanner:** Move list graphs validation to runtime ([googleapis#2154](googleapis#2154)) ([914b3ee](googleapis@914b3ee)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> f520b4e
🤖 I have created a release *beep* *boop* --- ## [0.24.0](googleapis/mcp-toolbox@v0.23.0...v0.24.0) (2025-12-19) ### Features * **sources/cloud-gemini-data-analytics:** Add the Gemini Data Analytics (GDA) integration for DB NL2SQL conversion to Toolbox ([googleapis#2181](googleapis#2181)) ([aa270b2](googleapis@aa270b2)) * **source/cloudsqlmysql:** Add support for IAM authentication in Cloud SQL MySQL source ([googleapis#2050](googleapis#2050)) ([af3d3c5](googleapis@af3d3c5)) * **sources/oracle:** Add Oracle OCI and Wallet support ([googleapis#1945](googleapis#1945)) ([8ea39ec](googleapis@8ea39ec)) * Support combining prebuilt and custom tool configurations ([googleapis#2188](googleapis#2188)) ([5788605](googleapis@5788605)) * **tools/mysql-get-query-plan:** Add new `mysql-get-query-plan` tool for MySQL source ([googleapis#2123](googleapis#2123)) ([0641da0](googleapis@0641da0)) ### Bug Fixes * **spanner:** Move list graphs validation to runtime ([googleapis#2154](googleapis#2154)) ([914b3ee](googleapis@914b3ee)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> f520b4e
…onversion to Toolbox (googleapis#2181) ## Description This PR is to add the Gemini Data Analytics (GDA) integration for DB NL2SQL conversion to Toolbox. It allows the user to convert a natural language query to SQL statement based on their database instance. See the doc section for details. ## PR Checklist > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change 🛠️ Fixes googleapis#2180 --------- Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [0.24.0](googleapis/mcp-toolbox@v0.23.0...v0.24.0) (2025-12-19) ### Features * **sources/cloud-gemini-data-analytics:** Add the Gemini Data Analytics (GDA) integration for DB NL2SQL conversion to Toolbox ([googleapis#2181](googleapis#2181)) ([aa270b2](googleapis@aa270b2)) * **source/cloudsqlmysql:** Add support for IAM authentication in Cloud SQL MySQL source ([googleapis#2050](googleapis#2050)) ([af3d3c5](googleapis@af3d3c5)) * **sources/oracle:** Add Oracle OCI and Wallet support ([googleapis#1945](googleapis#1945)) ([8ea39ec](googleapis@8ea39ec)) * Support combining prebuilt and custom tool configurations ([googleapis#2188](googleapis#2188)) ([5788605](googleapis@5788605)) * **tools/mysql-get-query-plan:** Add new `mysql-get-query-plan` tool for MySQL source ([googleapis#2123](googleapis#2123)) ([0641da0](googleapis@0641da0)) ### Bug Fixes * **spanner:** Move list graphs validation to runtime ([googleapis#2154](googleapis#2154)) ([914b3ee](googleapis@914b3ee)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [0.24.0](googleapis/mcp-toolbox@v0.23.0...v0.24.0) (2025-12-19) ### Features * **sources/cloud-gemini-data-analytics:** Add the Gemini Data Analytics (GDA) integration for DB NL2SQL conversion to Toolbox ([#2181](googleapis/mcp-toolbox#2181)) ([aa270b2](googleapis/mcp-toolbox@aa270b2)) * **source/cloudsqlmysql:** Add support for IAM authentication in Cloud SQL MySQL source ([#2050](googleapis/mcp-toolbox#2050)) ([af3d3c5](googleapis/mcp-toolbox@af3d3c5)) * **sources/oracle:** Add Oracle OCI and Wallet support ([#1945](googleapis/mcp-toolbox#1945)) ([8ea39ec](googleapis/mcp-toolbox@8ea39ec)) * Support combining prebuilt and custom tool configurations ([#2188](googleapis/mcp-toolbox#2188)) ([5788605](googleapis/mcp-toolbox@5788605)) * **tools/mysql-get-query-plan:** Add new `mysql-get-query-plan` tool for MySQL source ([#2123](googleapis/mcp-toolbox#2123)) ([0641da0](googleapis/mcp-toolbox@0641da0)) ### Bug Fixes * **spanner:** Move list graphs validation to runtime ([#2154](googleapis/mcp-toolbox#2154)) ([914b3ee](googleapis/mcp-toolbox@914b3ee)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
Description
This PR is to add the Gemini Data Analytics (GDA) integration for DB NL2SQL conversion to Toolbox. It allows the user to convert a natural language query to SQL statement based on their database instance. See the doc section for details.
PR Checklist
CONTRIBUTING.md
bug/issue
before writing your code! That way we can discuss the change, evaluate
designs, and agree on the general idea
!if this involve a breaking change🛠️ Fixes #2180