rilldata/rill

GitHub: rilldata/rill

一款由 OLAP 引擎驱动、支持 AI Agent 协作的高性能开源商业智能工具,通过代码化方式实现从数据建模到仪表盘部署的全流程自动化。

Stars: 2752 | Forks: 186

Rill logo

Agent 优先,人类友好的商业智能

GitHub license GitHub tag (latest SemVer) GitHub commit activity GitHub contributors GitHub downloads CI/CD

文档 · 数据谈话

Rill dashboard

**Rill** 是面向人类和 Agent 最快的 BI 工具,由 ClickHouse 和 DuckDB 等 OLAP 引擎驱动。 ## 快速开始 ``` curl https://rill.sh | sh # install rill start my-project # create a project and open the UI ``` ### 携带 Agent 上下文搭建项目 使用 `rill init` 以交互方式搭建项目: ``` ➜ rill init ? Project name my-rill-project ? OLAP engine duckdb ? Agent instructions claude Created a new Rill project at ~/my-rill-project Added Claude instructions in .claude and .mcp.json Success! Run the following command to start the project: rill start my-rill-project ``` ## 为什么选择 Rill? - **与 Agent 协作构建** — BI-as-code(YAML + SQL)意味着像 Claude Code 和 Cursor 这样的编码 Agent 可以端到端地创建项目、仪表盘和安全策略 - **语义层** — 维度、度量和时间粒度的单一事实来源 — 使用 YAML 定义,在查询时针对您的 OLAP 引擎生成 SQL - **与 Agent 探索** — 对话式 BI 允许业务用户使用自然语言查询指标;[MCP server](https://docs.rilldata.com/explore/mcp) 将 AI Agent 直接连接到您的语义层 - **实时性能** — 任何规模下均可实现亚秒级查询;ClickHouse 用于处理数十亿行数据,DuckDB 用于较小的数据集和快速迭代 - **可嵌入** — 仪表盘、API 和 Agent 界面可直接交付到您的产品中 ## 功能 ### Rill Developer(本地) - [**连接器**](https://docs.rilldata.com/build/connectors/) — S3、GCS、数据库以及 20 多种数据源 - [**OLAP 引擎**](https://docs.rilldata.com/developers/build/connectors/olap) — 包含托管的 ClickHouse 或 DuckDB,或连接外部引擎(ClickHouse Cloud、Druid、Pinot、MotherDuck) - [**SQL 模型**](https://docs.rilldata.com/build/models/) — 使用 SQL 转换原始数据,将模型连接在一起 - [**数据剖析**](https://docs.rilldata.com/build/models) — 即时的列统计和分布 - [**增量摄入**](https://docs.rilldata.com/build/models/incremental-models) — 每次运行仅加载新数据,保持大型数据集的最新状态,无需全量刷新 - [**语义层**](https://docs.rilldata.com/build/metrics-view/) — YAML 中的维度、度量和时间粒度 - [**行访问策略**](https://docs.rilldata.com/build/metrics-view/security) — 基于用户和组的数据访问控制 - [**本地仪表盘**](https://docs.rilldata.com/build/dashboards) — 在本地预览和探索仪表盘 ### Rill Cloud - [**部署**](https://docs.rilldata.com/deploy/deploy-dashboard/) — 基于 Git 的版本化部署 — 通过 `rill deploy` 推送或连接代码库以实现自动 CI/CD - [**探索与画布仪表盘**](https://docs.rilldata.com/build/dashboards) — 交互式仪表盘,可嵌入您的产品中 - [**对话式 BI**](https://docs.rilldata.com/explore/ai-chat) — 使用自然语言提问 - [**MCP Server**](https://docs.rilldata.com/explore/mcp) — 将 Claude、ChatGPT 或任何 AI Agent 连接到您的指标 - [**自定义 API 与嵌入**](https://docs.rilldata.com/build/custom-apis/) — 通过 REST 暴露指标或嵌入仪表盘 - [**告警与报告**](https://docs.rilldata.com/developers/build/alerts) — 阈值告警,可通过代码或 UI 定义 ## 工作原理 使用代码定义一切 — 模型、指标、仪表盘 — Rill 负责剩下的工作。 **1. 连接数据** — `models/events.yaml` ``` type: model connector: duckdb materialize: true sql: | select * from read_parquet('gs://rilldata-public/auction_data.parquet') ``` **2. 定义指标** — `metrics/events_metrics.yaml` ``` version: 1 type: metrics_view model: events timeseries: timestamp dimensions: - name: country column: country - name: device column: device_type measures: - name: total_events expression: count(*) - name: revenue expression: sum(price * quantity) description: Total revenue ``` **3. 创建仪表盘** — `dashboards/events_explore.yaml` ``` type: explore display_name: "Events Dashboard" metrics_view: events_metrics dimensions: "*" measures: "*" ``` **4. 部署** ``` rill deploy # push to Rill Cloud ``` 您的指标视图立即可以在 Rill Cloud 上查询 — 添加 YAML 文件以配置仪表盘、告警和自定义 API。 ## 了解更多 [Rill Developer 入门指南](https://www.youtube.com/watch?v=oQSok8Dy-D0) • [使用 Rill 探索数据](https://www.youtube.com/watch?v=wTP46eOzoCk&list=PL_ZoDsg2yFKgi7ud_fOOD33AH8ONWQS7I&index=1) • [岩石上的数据谈话](https://www.youtube.com/playlist?list=PL_ZoDsg2yFKgr_YEc4XOY0wlRLqzyR07q) • [使用 Claude Code 和 Rill 进行 Agentic 分析](https://www.youtube.com/watch?v=k6Lbu2cVH4g&t=2s) ## 示例 | 示例 | 描述 | 链接 | | -------------------- | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | | **程序化广告** | 用于定价和营销活动表现的 Bidstream 数据 | [GitHub](https://github.com/rilldata/rill-examples/tree/main/rill-openrtb-prog-ads) · [演示](https://ui.rilldata.com/demo/rill-openrtb-prog-ads) | | **成本监控** | 云基础设施与客户数据合并 | [GitHub](https://github.com/rilldata/rill-examples/tree/main/rill-cost-monitoring) · [演示](https://ui.rilldata.com/demo/rill-cost-monitoring) | | **GitHub 分析** | 贡献者活动和提交模式 | [GitHub](https://github.com/rilldata/rill-examples/tree/main/rill-github-analytics) · [演示](https://ui.rilldata.com/demo/rill-github-analytics) | 或者探索一个[实时嵌入式仪表盘](https://rill-embedding-example.netlify.app/)。 ## 社区 [![Discord](https://img.shields.io/badge/Discord-Join%20Chat-7289da?logo=discord&logoColor=white)](https://discord.gg/2ubRfjC7Rh) [![Twitter](https://img.shields.io/badge/Twitter-Follow-1da1f2?logo=twitter&logoColor=white)](https://twitter.com/RillData) [![GitHub Discussions](https://img.shields.io/badge/GitHub-Discussions-181717?logo=github&logoColor=white)](https://github.com/rilldata/rill/discussions) ## 贡献 我们欢迎您的贡献!请参阅我们的[贡献指南](CONTRIBUTING.md)开始参与。
标签:ClickHouse, DuckDB, EVTX分析, OLAP, 代码示例, 商业智能, 多线程, 数据分析, 日志审计