Author: hjlarry
Version: 0.0.3
Type: extension
Repo: https://github.com/hjlarry/dify-plugin-database
Feature Request: issues
The sql_execute tool can run any SQL query; for enhanced security, always use a read-only database account.
A database 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.
mysql+pymysql://root:123456@localhost:3306/test
postgresql+psycopg2://postgres:123456@localhost:5432/test
sqlite:///test.db
The OUTPUT FORMAT is used to specify the format of the output data. If you don't specify it, the default format is json and will output in the json variable of workflow node. md will output in the text variable, other format will create file and output in the files variable.
If you input the DB URI field, it will overwrite the default authorization uri, so this will be useful if you want to use different databases in the same workflow.
This tool will use the default prompt here to generate a sql query. If you specify the TABLES field, it will only get those tables' schema into the LLM context.
example url request format:
curl -X POST 'https://daemon-plugin.dify.dev/o3wvwZfYFLU5iGopr5CxYmGaM5mWV7xf/sql' -H 'Content-Type: application/json' -d '{"query":"select * from test", "format": "md"}'- add
cryptographyto requirements.txt to support mysql 8.1 sha256 link - remove database uri setting of the endpoint
- add a
db_urito support link to multiple databases - change the
outputof sql_execute tool to a form format - change the
tablesof text2sql tool to a llm format - fix sql query being converted to lowercase issue
