orionbelt-semantic-layer
by ralfbecher·★ 46·综合分 45
OrionBelt 语义层将 YAML 语义模型转换为针对多个数据库的优化 SQL,通过 MCP API 提供。
概述
OrionBelt 语义层是一种 API 优先的语义引擎,它将声明性 YAML 模型编译为针对多个数据库平台的优化、特定于方言的 SQL,包括 BigQuery、PostgreSQL、Snowflake、ClickHouse、Dremio、Databricks、DuckDB 和 MySQL。它使 AI 代理能够使用业务概念而非原始 SQL 查询数据库,通过 REST API 和 MCP 集成实现该解决方案。该版本提供了代码即分析功能,具有版本控制的 YAML 模型、特定于方言的 SQL 生成,以及包括 UI、API 和 MCP 服务器在内的完整集成界面。
试试问 AI
装完之后,这里有 6 个你可以让 AI 做的事:
什么时候选它
使用多种数据库方言的团队,希望一次性定义分析语义,并通过编程接口编译跨平台的优化SQL。
什么时候不要选它
您需要数据库的写入权限(此系统仅支持只读),需要超出星型模式模式的复杂连接,或需要超出语义模型能力的广泛自定义SQL逻辑。
此 server 暴露的工具
从 README 抽取出 12 个工具compile_queryCompile a query into SQL based on the semantic model
validate_modelValidate a semantic model definition
list_modelsList available semantic models
query_planGet query plan information without executing the query
find_semanticsFind semantic elements in the model
execute_queryExecute a compiled query against the database
compile_examplesGet example queries from model definitions
heartbeatInvalidate cache for dependent queries
get_model_healthCheck model health including orphaned elements
export_modelExport model in different formats
get_warningsGet warnings from model operations
discover_databasesDiscover available databases and schemas
可对比工具
安装
通过单独的 MCP 客户端安装 OrionBelt MCP 服务器:
pip install orionbelt-semantic-layer-mcp添加到 Claude Desktop 配置文件 claude_desktop_config.json:
{
"mcpServers": {
"orionbelt": {
"command": "uvx",
"args": ["orionbelt-semantic-layer-mcp"]
}
}
}主语义层 API 可直接安装:
pip install orionbelt-semantic-layer或通过 Docker:
docker run -p 8080:8080 ralforion/orionbelt-apiFAQ
- OrionBelt 支持哪些数据库?
- OrionBelt 支持 BigQuery、PostgreSQL、Snowflake、ClickHouse、Dremio、Databricks、DuckDB/MotherDuck 和 MySQL。
- OrionBelt 如何处理 SQL 注入防护?
- OrionBelt 使用基于 AST 的 SQL 生成,而非字符串模板,这确保了在所有支持的方言中生成防注入的 SQL。
- 我能否将 OrionBelt 与 Claude 以外的 AI 助手一起使用?
- 是的,MCP 服务器也适用于 Copilot、Cursor 和 Windsurf。主 API 可以与任何支持 REST 或 HTTP 端口的平台集成。
orionbelt-semantic-layer 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。