[PR #220] [CLOSED] db_query #716

Closed
opened 2026-02-22 17:36:53 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugins/pull/220
Author: @canjian215215
Created: 3/24/2025
Status: Closed

Base: mainHead: main


📝 Commits (3)

  • 279cc2f This plugin can convert statistical data into ECharts charts for display.
  • f214f2c add dify_echarts.difypkg
  • 657a397 This is a dify-db tool make it easy to query data from existing databases.

📊 Changes

48 files changed (+3115 additions, -0 deletions)

View changed files

Organization/db_query/.difyignore (+178 -0)
Organization/db_query/.env.example (+4 -0)
Organization/db_query/.gitignore (+171 -0)
Organization/db_query/GUIDE.md (+117 -0)
Organization/db_query/PRIVACY.md (+3 -0)
Organization/db_query/README.md (+56 -0)
Organization/db_query/_assets/icon.svg (+1 -0)
Organization/db_query/db_query.difypkg (+0 -0)
Organization/db_query/endpoints/sql_execute.py (+37 -0)
Organization/db_query/endpoints/sql_execute.yaml (+5 -0)
Organization/db_query/main.py (+6 -0)
Organization/db_query/manifest.yaml (+57 -0)
Organization/db_query/provider/db_query.py (+44 -0)
Organization/db_query/provider/db_query.yaml (+118 -0)
Organization/db_query/provider/db_query_endpoint.yaml (+104 -0)
Organization/db_query/requirements.txt (+7 -0)
Organization/db_query/tools/db_util.py (+83 -0)
Organization/db_query/tools/sql_execute.py (+71 -0)
Organization/db_query/tools/sql_execute.yaml (+63 -0)
Organization/db_query/tools/text2sql.py (+103 -0)

...and 28 more files

📄 Description

dify db_query

Author: fly
Version: 0.0.2
Type: tool

Description

This is a dify-db tool make it easy to query data from existing databases.

You can get different format of data, like json, csv, yaml, xlsx, html, md etc. Also support use a url to get those data.

Features

  • Supports Multiple Databases: dify-db is compatible with a wide range of databases, including MySQL, Doris, Oracle, PostgreSQL, and SQLite.
  • Versatile Data Formats: The tool allows you to convert data into various formats, such as JSON, CSV, YAML, XLSX, HTML, and Markdown.
  • Data Retrieval via URL: dify-db supports fetching data through URLs.

Usage

Database Connection Strings

  • db_type: mysql/Doris/oracle/postgreSQL/SQLite
  • db_host: 127.0.0.1
  • db_port: 3306
  • db_username: test
  • db_password: 123
  • db_name: test
  • db_properties: alt_host=host1&alt_host=host2&ssl_cipher=/path/to/crt

Tools

  • sql: This tool is used to execute SQL queries against the database.
  • query: This tool translates user input into a valid SQL query.
  • endpoint: This feature allows you to retrieve data via URL requests.

Example URL Request

curl -X POST 'http://localhost/e/ami75gr7a832qyw9/sql' \
  -H 'Content-Type: application/json' \
  -d '{"query":"select * from test", "format": "json"}'

Installation

Installation Link

References

Version History

  • 0.0.2 (Initial Release)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-plugins/pull/220 **Author:** [@canjian215215](https://github.com/canjian215215) **Created:** 3/24/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (3) - [`279cc2f`](https://github.com/langgenius/dify-plugins/commit/279cc2f9c0594c99fc2552c62b69460f35473f81) This plugin can convert statistical data into ECharts charts for display. - [`f214f2c`](https://github.com/langgenius/dify-plugins/commit/f214f2c173535a2ae0805bd883d31b045ad76c91) add dify_echarts.difypkg - [`657a397`](https://github.com/langgenius/dify-plugins/commit/657a39787d7543ce6f6de652ff882e7124cd709a) This is a dify-db tool make it easy to query data from existing databases. ### 📊 Changes **48 files changed** (+3115 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `Organization/db_query/.difyignore` (+178 -0) ➕ `Organization/db_query/.env.example` (+4 -0) ➕ `Organization/db_query/.gitignore` (+171 -0) ➕ `Organization/db_query/GUIDE.md` (+117 -0) ➕ `Organization/db_query/PRIVACY.md` (+3 -0) ➕ `Organization/db_query/README.md` (+56 -0) ➕ `Organization/db_query/_assets/icon.svg` (+1 -0) ➕ `Organization/db_query/db_query.difypkg` (+0 -0) ➕ `Organization/db_query/endpoints/sql_execute.py` (+37 -0) ➕ `Organization/db_query/endpoints/sql_execute.yaml` (+5 -0) ➕ `Organization/db_query/main.py` (+6 -0) ➕ `Organization/db_query/manifest.yaml` (+57 -0) ➕ `Organization/db_query/provider/db_query.py` (+44 -0) ➕ `Organization/db_query/provider/db_query.yaml` (+118 -0) ➕ `Organization/db_query/provider/db_query_endpoint.yaml` (+104 -0) ➕ `Organization/db_query/requirements.txt` (+7 -0) ➕ `Organization/db_query/tools/db_util.py` (+83 -0) ➕ `Organization/db_query/tools/sql_execute.py` (+71 -0) ➕ `Organization/db_query/tools/sql_execute.yaml` (+63 -0) ➕ `Organization/db_query/tools/text2sql.py` (+103 -0) _...and 28 more files_ </details> ### 📄 Description ## dify db_query **Author:** fly **Version:** 0.0.2 **Type:** tool ## Description This is a dify-db tool make it easy to query data from existing databases. You can get different format of data, like json, csv, yaml, xlsx, html, md etc. Also support use a url to get those data. ## Features * **Supports Multiple Databases**: dify-db is compatible with a wide range of databases, including MySQL, Doris, Oracle, PostgreSQL, and SQLite. * **Versatile Data Formats**: The tool allows you to convert data into various formats, such as JSON, CSV, YAML, XLSX, HTML, and Markdown. * **Data Retrieval via URL**: dify-db supports fetching data through URLs. ## Usage ### Database Connection Strings * db_type: `mysql/Doris/oracle/postgreSQL/SQLite` * db_host: `127.0.0.1` * db_port: `3306` * db_username: `test` * db_password: `123` * db_name: `test` * db_properties: `alt_host=host1&alt_host=host2&ssl_cipher=/path/to/crt` ### Tools * `sql`: This tool is used to execute SQL queries against the database. * `query`: This tool translates user input into a valid SQL query. * `endpoint`: This feature allows you to retrieve data via URL requests. ### Example URL Request ```bash curl -X POST 'http://localhost/e/ami75gr7a832qyw9/sql' \ -H 'Content-Type: application/json' \ -d '{"query":"select * from test", "format": "json"}' ``` ## Installation [Installation Link](#) ### References * [dify-plugin-tools-dbquery on GitHub](https://github.com/junjiem/dify-plugin-tools-dbquery) * [database on Dify AI Marketplace](https://marketplace.dify.ai/plugins/hjlarry/database?language=zh-Hans) ## Version History * 0.0.2 (Initial Release) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 17:36:53 -05:00
yindo closed this issue 2026-02-22 17:36:56 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugins#716