Feature Proposal: Direct Database Connection with Dynamic Schema Retrieval for Process Orchestration(postgres/mysql connector module required)
Self Checks
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
- [x] Please do not modify this template :) and fill in all the required fields.
1. Is this request related to a challenge you're experiencing? Tell me about your story.
In the latest version of Dify, is database connection supported? I want users to be able to query databases using natural language during process orchestration. The database structure isn't hardcoded in the knowledge base but is passed to the LLM by real - time database reading. This way, the database can be updated freely in both content and structure. Then, during process runtime in Dify, the database structure can be fetched in real - time for the LLM. I added database connection code for table structure queries to the Python code execution module. But after running, Dify shows 'error: operation not permitted'. However, the code works in PyCharm. Is this due to sandbox restrictions or something else? Could you please consider adding a direct database connection module to the process orchestration menu in future development? Thank you!
2. Additional context or comments
No response
3. Can you help us with this feature?
- [ ] I am interested in contributing to this feature.
Consider using this plugin: https://marketplace.dify.ai/plugins/hjlarry/database
https://github.com/junjiem/dify-plugin-tools-dbquery
https://marketplace.dify.ai/plugins/hjlarry/database?language=zh-Hans