What Redash Does
- SQL Editor: Full-featured SQL editor with schema browser, autocomplete, and query history
- 50+ Data Sources: PostgreSQL, MySQL, BigQuery, Snowflake, Redshift, ClickHouse, MongoDB, APIs, and more
- Visualizations: Charts, tables, maps, pivot tables, word clouds, and more from query results
- Dashboards: Compose visualizations into interactive dashboards with filters and parameters
- Alerts: Automated alerts when query results match conditions (email, Slack, webhook)
- Scheduled Queries: Auto-refresh queries on a schedule (hourly, daily, weekly)
- Sharing: Share queries and dashboards with team via links or embedding
- API: Full REST API for programmatic access to queries and results
- Parameters: Parameterized queries for dynamic, interactive dashboards
Architecture
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Browser │────▶│ Redash │────▶│ Your Data │
│ Dashboard │ │ Server │ │ PostgreSQL │
└──────────────┘ │ (Python/ │ │ MySQL │
│ Flask) │ │ BigQuery │
└──────┬───────┘ │ Snowflake │
│ │ ClickHouse │
┌──────┴───────┐ │ 50+ more │
│ Redis + │ └──────────────┘
│ PostgreSQL │
│ (Metadata) │
└──────────────┘Self-Hosting
Docker Compose
services:
redash:
image: redash/redash:latest
command: server
ports:
- "5000:5000"
environment:
REDASH_DATABASE_URL: postgresql://redash:redash@postgres/redash
REDASH_REDIS_URL: redis://redis:6379/0
REDASH_SECRET_KEY: your-secret-key
depends_on:
- postgres
- redis
worker:
image: redash/redash:latest
command: worker
environment:
REDASH_DATABASE_URL: postgresql://redash:redash@postgres/redash
REDASH_REDIS_URL: redis://redis:6379/0
scheduler:
image: redash/redash:latest
command: scheduler
environment:
REDASH_DATABASE_URL: postgresql://redash:redash@postgres/redash
REDASH_REDIS_URL: redis://redis:6379/0
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: redash
POSTGRES_PASSWORD: redash
POSTGRES_DB: redash
volumes:
- pg-data:/var/lib/postgresql/data
redis:
image: redis:7-alpine
volumes:
pg-data:Key Features
Parameterized Queries
-- Parameters appear as {{param_name}} in queries
SELECT
date_trunc('{{period}}', created_at) as period,
COUNT(*) as orders,
SUM(total) as revenue
FROM orders
WHERE created_at BETWEEN '{{start_date}}' AND '{{end_date}}'
AND status = '{{status}}'
GROUP BY 1
ORDER BY 1
-- Parameters become dropdown/date picker controls in the dashboard
-- period: day, week, month (dropdown)
-- start_date, end_date: date pickers
-- status: completed, pending, cancelled (dropdown from query)Visualization Types
| Type | Best For |
|---|---|
| Line/Area Chart | Time series trends |
| Bar Chart | Category comparisons |
| Pie/Donut | Proportions |
| Scatter | Correlations |
| Pivot Table | Multi-dimensional analysis |
| Map (Choropleth) | Geographic data |
| Counter | Single KPI number |
| Funnel | Conversion analysis |
| Word Cloud | Text frequency |
| Cohort | Retention analysis |
Scheduled Queries & Alerts
Query: "Daily Active Users"
Schedule: Every day at 8am
Alert: When result < 1000
→ Send to Slack #metrics
→ Email to team@company.comQuery Snippets
-- Save reusable SQL snippets
-- Snippet: "date_filter"
WHERE created_at BETWEEN '{{start_date}}' AND '{{end_date}}'
-- Snippet: "user_join"
LEFT JOIN users u ON u.id = t.user_id
-- Use with trigger keyword in SQL editorRedash vs Alternatives
| Feature | Redash | Metabase | Grafana | Superset |
|---|---|---|---|---|
| Query approach | SQL-first | Visual + SQL | PromQL + SQL | SQL + visual |
| Data sources | 50+ | 20+ | 100+ | 30+ |
| Ease of use | Medium (SQL) | Easy (no-code) | Medium | Medium |
| Best for | Data/SQL teams | Business users | DevOps/SRE | Data teams |
| Alerts | Yes | Yes | Yes | Yes |
| Embedding | Basic | Advanced | Yes | Yes |
| Community | Large | Very large | Very large | Large |
常见问题
Q: Redash 和 Metabase 怎么选? A: 如果你的团队习惯写 SQL,Redash 更自然。如果团队中有非技术人员需要自主探索数据,Metabase 的可视化查询构建器更友好。两者都可以免费自托管。
Q: Redash 还在积极维护吗? A: Redash 被 Databricks 收购后,官方开发节奏放缓。但社区仍在活跃维护(合并 PR 和修复 bug)。对于新项目,也可以考虑 Metabase 或 Apache Superset。
Q: 可以可视化 API 数据吗? A: 可以。Redash 支持 JSON API 和 Python 脚本作为数据源。你可以写 Python 代码调用任何 API 并返回结果用于可视化。
来源与致谢
- GitHub: getredash/redash — 28.3K+ ⭐ | BSD-2-Clause
- 官网: redash.io