https://github.com/oceanbase/dify-plugin-oceanbase
Enables secure SQL query execution on OceanBase databases through Dify applications
https://github.com/oceanbase/dify-plugin-oceanbase
dify dify-plugins oceanbase vector vector-database
Last synced: about 1 month ago
JSON representation
Enables secure SQL query execution on OceanBase databases through Dify applications
- Host: GitHub
- URL: https://github.com/oceanbase/dify-plugin-oceanbase
- Owner: oceanbase
- License: apache-2.0
- Created: 2025-09-25T08:31:40.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2026-01-28T04:53:32.000Z (3 months ago)
- Last Synced: 2026-01-31T07:47:44.486Z (3 months ago)
- Topics: dify, dify-plugins, oceanbase, vector, vector-database
- Language: Python
- Homepage: https://www.oceanbase.ai
- Size: 54.7 KB
- Stars: 0
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## OceanBase
**Author:** oceanbase
**Version:** 0.0.3
**Type:** tool
**Repo:** https://github.com/oceanbase/dify-plugin-oceanbase
### Description
This plugin is used to query OceanBase databases and includes multiple tools to help users interact with OceanBase databases.
### Tools Introduction
#### 1. Execute SQL
- **Function**: Execute SQL queries on existing OceanBase databases
- **Usage**: Directly execute SQL statements starting with SELECT, SHOW, or WITH
- **Output Format**: Supports multiple formats including JSON, CSV, YAML, Markdown, Excel, HTML, etc.
- **Security Restrictions**: Only supports query statements to ensure database security
#### 2. Get Table Schema
- **Function**: Get table structure information from the database
- **Usage**: Provide database context for LLM to help understand table structure
- **Flexibility**: Can specify specific tables or get structure information for all tables
- **Use Cases**: Understand database structure before generating SQL queries
#### 3. Text to SQL
- **Function**: Use LLM to convert natural language queries into SQL statements
- **Usage**: Allow users to describe query requirements in natural language and automatically generate corresponding SQL
- **Intelligence**: Generate accurate SQL based on database context and table structure information
- **Model Selection**: Support selecting different large language models for conversion
#### 4. Hybrid Search
- **Function**: Execute hybrid search combining vector similarity and full-text search on OceanBase or SeekDB tables
- **Requirements**: Supported on OceanBase 4.4.1+ and SeekDB. Tables must have vector indexes or full-text indexes.
- **Table Type Support**:
- Heap tables: Fully supported with primary key for hybrid search
- Primary key tables : Not supported for hybrid search
- **Features**:
- Combines vector similarity search with full-text search for more accurate results
- Supports searching across multiple tables
- Uses embedding models to convert query text to vectors
- **Use Cases**: Semantic search, document retrieval, question answering systems
### Usage Instructions
1. **Database Connection**: Configure OceanBase database connection information
2. **Select Tools**: Choose appropriate tools based on requirements
3. **Execute Queries**: Query data through natural language or direct SQL
4. **Get Results**: Obtain query results in specified format
### Notes
- This plugin only supports query operations and does not support data modification
- It is recommended to use read-only database accounts to ensure security
- Supports multiple output formats that can be selected as needed
- Hybrid Search requires OceanBase 4.4.1+ or SeekDB, and tables must have appropriate indexes
### References
This plugin references [dify-plugin-database](https://github.com/hjlarry/dify-plugin-database) and has been adapted and optimized for OceanBase databases.