# Redash

**Redash** 是一款开源、基于浏览器的数据分析工具，用户可连接数据库及其他数据源，编写 SQL 和 NoSQL 查询，并将结果转化为图表、仪表盘和警报，且可通过 URL 分享。它采用 BSD-2-Clause 许可证，主要用 Python 编写，通过基于 Docker 的部署方式自托管；项目始于 2013 年，自 2020 年 [Databricks](https://www.edgepedia.org/zh/databricks) 收购创始公司以来一直由社区维护。<sup>[1](https://redash.io/help/faq/general/)</sup><sup> • </sup><sup>[2](https://appsgit.com/apps/redash)</sup><sup> • </sup><sup>[3](https://stackscape.org/en/p/redash/)</sup>

| 关键事实 | 详情 |
|---|---|
| 功能 | 基于浏览器的 SQL 查询编辑器，带模式浏览器和自动补全；可视化可组合为仪表盘，支持定时刷新和警报<sup>[1](https://redash.io/help/faq/general/)</sup> |
| 许可证与语言 | BSD-2-Clause，主要用 Python 编写<sup>[2](https://appsgit.com/apps/redash)</sup> |
| 数据源 | 超过 35 种 SQL、NoSQL 和 API 数据源，包括 PostgreSQL、MySQL、BigQuery、Snowflake、Databricks、MongoDB、Elasticsearch 和 Google Sheets<sup>[4](https://deployopen.com/comparisons/data-and-analytics/compared/open-source-bi-tools-compared)</sup><sup> • </sup><sup>[5](https://redash.io/help/data-sources/querying/supported-data-sources/)</sup> |
| 架构 | Flask API 服务器、React 前端、PostgreSQL 存储元数据和查询结果、Redis 和 RQ 负责作业队列；RQ 在 v10.0 中取代了 Celery<sup>[3](https://stackscape.org/en/p/redash/)</sup> |
| 历史 | 由 Arik Fraimovich 于 2013 年启动开发；Databricks 于 2020 年 6 月收购该公司；托管服务于 2021 年 11 月 30 日关停；2025 年 1 月以 v25.1.0 恢复发布<sup>[3](https://stackscape.org/en/p/redash/)</sup><sup> • </sup><sup>[6](https://www.thirdbrain.tech/KB-TECH/REPORTING/redash)</sup> |
| 最新版本 | v26.9.0（2026 年 9 月），修复了 13 个安全公告，其中 6 个为高危<sup>[7](https://github.com/getredash/redash/releases)</sup> |
| 规模 | GitHub 约 28,900 星标、4,600 复刻；自 2013 年 10 月 28 日仓库创建以来共 102 个版本<sup>[2](https://appsgit.com/apps/redash)</sup> |
| 自托管 | Linux 服务器或 Docker 容器，需 PostgreSQL、Redis 以及 API 和工作进程；建议至少 4 GB 内存<sup>[1](https://redash.io/help/faq/general/)</sup><sup> • </sup><sup>[4](https://deployopen.com/comparisons/data-and-analytics/compared/open-source-bi-tools-compared)</sup> |

## 用途与工作流

Redash 围绕一个简单的循环构建：连接数据源、编写查询、分享结果。该项目面向那些由 SQL 用户探索、查询、可视化和分享数据的组织，他们的工作随后通过仪表盘提供给技术能力较弱的同事。<sup>[1](https://redash.io/help/faq/general/)</sup>

文档中的入门路径有五步：添加数据源、编写查询、添加可视化、创建仪表盘、邀请同事。查询最初是未发布的草稿，在发布之前不能出现在仪表盘上，也不能驱动警报；查询不能删除，只能归档，直接链接继续有效。<sup>[8](https://redash.io/help/user-guide/getting-started/)</sup><sup> • </sup><sup>[9](https://redash.io/help/user-guide/querying/writing-queries)</sup> 用户可以复刻现有查询来创建副本，已保存的查询默认只有创建者和管理员组成员可编辑。<sup>[9](https://redash.io/help/user-guide/querying/writing-queries)</sup>

**查询执行。** 用户运行查询时，服务器将作业加入队列；RQ 工作进程通过每个数据源对应的查询运行器（Query Runner）查询源数据库，并将结果存入 [PostgreSQL](https://www.edgepedia.org/zh/postgresql)。定时运行按每个查询的刷新间隔创建，警报则将刷新后的结果与条件比较，并通过电子邮件、Slack 或 Webhook 发出通知。查询运行器是 Python 类，每个数据源一个，项目称这使得添加新数据源相当容易。<sup>[3](https://stackscape.org/en/p/redash/)</sup>

## 数据源

Redash 的官方数据源列表涵盖数十种系统，大致分为：云数据仓库（Amazon Redshift、Google BigQuery、Snowflake、Databricks、Azure Synapse）、关系型数据库（PostgreSQL、MySQL、Microsoft SQL Server、Oracle、DB2、SQLite、CockroachDB、兼容 MariaDB 的 MemSQL）、NoSQL 与时序存储（MongoDB、Cassandra、ScyllaDB、InfluxDB、Druid、ClickHouse）、文件与 SaaS 数据源（CSV、JSON、Google Spreadsheets、Google Analytics、Salesforce、JIRA）以及基础设施服务（Prometheus、Graphite、Amazon CloudWatch）。<sup>[5](https://redash.io/help/data-sources/querying/supported-data-sources/)</sup>

部分数据源仅限自托管，包括 SQLite、Python 和 Shell 脚本，而 CSV 仅限托管版；Greenplum 和 OmniSciDB 仅出现在自托管一栏。<sup>[5](https://redash.io/help/data-sources/querying/supported-data-sources/)</sup>

## 查询结果数据源

一项独特的内置功能是查询结果数据源（Query Results Data Source，QRDS），它允许一个查询针对其他查询的结果运行。它以内存 SQLite 数据库实现，因此接受 SQLite 语法，每个已保存的查询以表的形式出现，别名为 `query_` 后跟其查询 ID；位于 `/queries/49588` 的查询被引用为 `query_49588`。<sup>[10](https://redash.io/help/user-guide/querying/query-results-data-source/)</sup>

三种别名形式控制新鲜度和参数。纯 `query_<id>` 会先重新执行底层查询，保证定时查询获得最新结果。`cached_query_<id>` 使用最近一次执行的缓存结果，以数据较旧为代价提升性能，两种形式可在同一查询中混用。`param_query_<id>_{key=value}` 将 URL 编码的参数传递给参数化的源查询。<sup>[10](https://redash.io/help/user-guide/querying/query-results-data-source/)</sup>

权限会贯穿始终：有权访问 QRDS 的用户，如果无权访问某个查询的底层数据源，仍然无法执行该查询，不过最近缓存的结果仍可查看。由于 QRDS 在内存中运行，如果 Redash 内存耗尽，针对大型结果集的查询可能会失败。<sup>[10](https://redash.io/help/user-guide/querying/query-results-data-source/)</sup>

## 可视化、仪表盘与嵌入

可视化基于已完成查询的结果表创建，并在查询编辑器界面中编辑，可设置类型、X 轴和 Y 轴以及分组。图表可视化可下载为本地 PNG 文件。<sup>[11](https://redash.io/help/user-guide/visualizations/visualizations-how-to/)</sup>

嵌入是一种受到充分支持的分享途径。任何可视化都能生成用于外部页面的 `<iframe>` 代码，托管版客户还可获得通过 `snap.redash.io` 提供的硬链接 PNG，适用于 iframe 无法工作的场景，例如 GitHub 议题。[查询字符串](https://www.edgepedia.org/zh/query-string)变量可调整嵌入效果：`?hide_parameters`、`?hide_header`、`?hide_link` 和 `?hide_timestamp`。带文本类型参数的查询不支持嵌入。<sup>[11](https://redash.io/help/user-guide/visualizations/visualizations-how-to/)</sup>

## API 与权限

根据项目的功能列表，界面中可用的所有功能也可通过 REST API 使用。<sup>[1](https://redash.io/help/faq/general/)</sup> 在结果端点（如 `/api/queries/<query_id>/results.<format>`）后附加格式扩展名，即可将查询结果获取为 JSON、CSV、TSV 或 XLSX。<sup>[12](https://deepwiki.com/getredash/redash/4.1-query-execution-api)</sup> 执行查询需要数据源访问权限；对数据源仅有只读访问权限的用户只能执行安全查询，即不带文本参数的查询，而执行已保存的查询还需要对该查询有查看或编辑权限。<sup>[12](https://deepwiki.com/getredash/redash/4.1-query-execution-api)</sup>

## 安全态势

Redash 的安全政策将两种行为视为已知的设计特性而非漏洞。第一，Python 查询运行器有意不作为安全沙箱，且默认禁用；任何被授予 Python 数据源访问权限的人，都应是可以信任其在工作进程环境中运行代码的人。第二，来自管理员配置的数据源的服务器端请求伪造不在范围内，因为连接任意主机（包括内部主机）是保留给管理员的核心功能。<sup>[13](https://git.mitgai.net/getredash/redash/blob/master/SECURITY.md)</sup>

OX Security 研究团队 2026 年 3 月的一项分析表明，这一警示所述的风险确实存在：他们利用了 Python 数据源中的沙箱逃逸，当该功能启用时，任何有查询权限的用户都能突破并执行底层服务器上的任意命令，实现完全接管。该逃逸依赖于一个不安全版本的 `getattr` 被赋值到沙箱化的内建函数中，使得可以沿着 Python 的对象模型导航到 `subprocess.Popen` 等类。OX 建议除非必要否则禁用 Python 数据源，并限制可运行 Python 查询的人员；项目本身在 v26.9.0 中的加固强化了受限 Python 属性和写入防护。<sup>[14](https://www.ox.security/blog/redashs-python-sandbox-escape-gives-attackers-full-server-access/)</sup><sup> • </sup><sup>[7](https://github.com/getredash/redash/releases)</sup>

版本 26.9.0 处理了 13 个安全公告，包括通过查询注释中的用户电子邮件地址进行的 SQL 注入、通过文本模式参数绕过查询执行限制，以及 QRDS 上的权限检查；它还默认禁用了自定义 [JavaScript](https://www.edgepedia.org/zh/javascript) 可视化。<sup>[7](https://github.com/getredash/redash/releases)</sup>

## 历史与维护记录

Arik Fraimovich 于 2013 年启动 Redash，作为分享 SQL 查询和结果的工具。Databricks 于 2020 年 6 月宣布收购 Redash 公司，并提供与 Databricks SQL 集成的托管可视化服务；app.redash.io 上的托管服务于 2021 年 11 月 30 日关停，以便公司专注于 Databricks 内部的 SQL 分析。<sup>[3](https://stackscape.org/en/p/redash/)</sup><sup> • </sup><sup>[6](https://www.thirdbrain.tech/KB-TECH/REPORTING/redash)</sup>

发布记录显示了这对节奏的影响。10.0 版（2021 年 10 月）用 RQ 取代了 Celery 作业队列，v10.1.0 于 2021 年 11 月跟进。此后三年多没有稳定版本发布，直到 2025 年 1 月的 v25.1.0，该版本引入了基于年月的版本号；v25.8.0、v26.3.0（新增 Python 3.13、DuckDB 和 DB2 运行器以及透视图）和 v26.9.0 到 2026 年陆续跟进。<sup>[3](https://stackscape.org/en/p/redash/)</sup><sup> • </sup><sup>[7](https://github.com/getredash/redash/releases)</sup> 仓库仍然活跃且未归档，截至 2026 年 10 月的十二个月中约有 84 次提交。<sup>[2](https://appsgit.com/apps/redash)</sup>

知名用户包括 Mozilla，其 STMO 遥测 SQL 分析环境运行在 Redash 上。<sup>[3](https://stackscape.org/en/p/redash/)</sup>

## 在开源 BI 工具中的位置

Redash 与 Metabase 和 [Apache Superset](https://www.edgepedia.org/zh/apache-superset) 并列为常被比较的开源 BI 选项。比较文章将其描述为一款轻量、SQL 优先的工具，适合希望快速从查询走向共享仪表盘的团队：它采用 BSD-2-Clause 许可证，仓库中没有付费层级，而 Metabase 使用 AGPL 并提供付费的 Pro 和企业版计划，Superset 为 Apache-2.0 且无付费版。比较页面指出，在漫长的发布空窗期之后，Redash 的开发节奏相对于替代品较慢。<sup>[4](https://deployopen.com/comparisons/data-and-analytics/compared/open-source-bi-tools-compared)</sup><sup> • </sup><sup>[15](https://exploregit.com/compare/best-open-source-business-intelligence-dashboard-tool)</sup> 2020 年 12 月的一项 BI 系统比较在入门门槛、功能、易用性和视觉外观等维度上给 Redash 打出 6.5/10，而 Metabase 为 8.0、Superset 为 7.7、Tableau 为 8.8，Redash 在“对任何会写 SQL 的人都门槛很低”这一点上最强。<sup>[16](https://valiotti.com/migrating-off-redash/)</sup>

## References

1. [General FAQ, Redash Help](https://redash.io/help/faq/general/)
2. [Redash, Self-Hosted Analytics, appsgit](https://appsgit.com/apps/redash)
3. [Redash: SQL query and visualization sharing, Stackscape](https://stackscape.org/en/p/redash/)
4. [Open-source BI tools compared: Superset, Metabase, Redash, Deploy Open](https://deployopen.com/comparisons/data-and-analytics/compared/open-source-bi-tools-compared)
5. [Supported Data Sources, Redash Help](https://redash.io/help/data-sources/querying/supported-data-sources/)
6. [Redash, thirdbrain.tech](https://www.thirdbrain.tech/KB-TECH/REPORTING/redash)
7. [Releases, getredash/redash, GitHub](https://github.com/getredash/redash/releases)
8. [Getting Started, Redash Help](https://redash.io/help/user-guide/getting-started/)
9. [Creating and Editing Queries, Redash Help](https://redash.io/help/user-guide/querying/writing-queries)
10. [Querying Existing Query Results, Redash Help](https://redash.io/help/user-guide/querying/query-results-data-source/)
11. [Visualizations How To, Redash Help](https://redash.io/help/user-guide/visualizations/visualizations-how-to/)
12. [Query Execution API, DeepWiki](https://deepwiki.com/getredash/redash/4.1-query-execution-api)
13. [Security Policy, getredash/redash](https://git.mitgai.net/getredash/redash/blob/master/SECURITY.md)
14. [Known, Unpatched, Exploitable: Redash's Python Sandbox Escape Gives Attackers Full Server Access, OX Security](https://www.ox.security/blog/redashs-python-sandbox-escape-gives-attackers-full-server-access/)
15. [Superset vs Metabase vs Redash: Open-Source BI Dashboards, ExploreGit](https://exploregit.com/compare/best-open-source-business-intelligence-dashboard-tool)
16. [Migrating Off Redash, For The Last Time, Valiotti Data](https://valiotti.com/migrating-off-redash/)

---
*Initially written Oct 26, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Databases and data systems › Data mining, warehousing, and big data › Big data industry, companies, and products

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/redash

English original: https://www.edgepedia.org/redash
