Back to skills
SKILL.md
Superset
ASecurityExpert coverage of Apache Superset (5.x through 6.x). Provides deep expertise in SQL Lab, chart exploration, dashboard design, database connectivity (50+ databases via SQLAlchemy), caching (Redis multi-tier), async queries (Celery), Jinja templating, security (RBAC/RLS/OAuth/LDAP), embedding (guest tokens), Kubernetes deployment, and performance optimization. WHEN: \"Superset\", \"Apache Superset\", \"SQL Lab\", \"Superset dashboard\", \"Superset chart\", \"Superset embedding\", \"superset_co...
- 4 stars
- 0 votes
- 0 copies
- 0 views
- Added September 24, 2026
Works with
Security analysis
100/100Pro scans all 4 files and shows the line behind each finding
npx -y skills add chrishuffman5/domain-expert --skill superset --agent claude-codeAre you the author of Superset?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/chrishuffman5-superset)---
name: superset
description: "Expert coverage of Apache Superset (5.x through 6.x). Provides deep expertise in SQL Lab, chart exploration, dashboard design, database connectivity (50+ databases via SQLAlchemy), caching (Redis multi-tier), async queries (Celery), Jinja templating, security (RBAC/RLS/OAuth/LDAP), embedding (guest tokens), Kubernetes deployment, and performance optimization. WHEN: \"Superset\", \"Apache Superset\", \"SQL Lab\", \"Superset dashboard\", \"Superset chart\", \"Superset embedding\", \"superset_config.py\", \"Preset\", \"Superset caching\", \"Superset Celery\", \"Superset Redis\", \"Superset RBAC\", \"Superset RLS\", \"Superset Jinja\", \"Superset Helm\", \"Superset Kubernetes\", \"ECharts Superset\", \"Superset feature flags\", \"Superset native filters\", \"Superset cross-filtering\"."
license: MIT
---
# Apache Superset
This skill covers Apache Superset across recent versions (5.x through 6.x):
- SQL Lab: multi-tab SQL editor, async queries, Jinja templating, virtual datasets, query history
- Chart exploration: 40+ visualization types via Apache ECharts plugin architecture, no-code builder
- Dashboard design: drag-and-drop layout, native filters, cross-filtering, tabs, auto-refresh, dark mode (6.0)
- Database connectivity: 50+ databases via SQLAlchemy + database-specific drivers, connection pool tuning
- Caching: multi-tier Redis caching (data, metadata, filter state, thumbnails, results backend)
- Async processing: Celery workers + Celery Beat scheduler, Global Async Queries (GAQ)
- Security: RBAC (Admin/Alpha/Gamma/sql_lab/Public), Row-Level Security, OAuth/LDAP/OIDC authentication, group-based ACL (6.0)
- Embedding: Embedded SDK with guest tokens, RLS enforcement, custom CSS styling
- Deployment: Kubernetes Helm chart, Gunicorn/uWSGI, production hardening, HPA scaling
- Configuration: `superset_config.py`, feature flags, Jinja context processors, StatsD metrics
- Semantic layer: physical + virtual datasets, metrics/calculated columns, SIP-182 external integration
When a question involves Superset 6.0-specific features (Ant Design v5, dark mode, theming, group-based ACL, distributed coordination), note the version requirement. When the version is unclear, provide general guidance and flag version-dependent behavior.
## When to Use This Agent
**Use this agent when:**
- Question involves SQL Lab usage, Jinja templating, or virtual datasets
- User needs help building or optimizing charts and dashboards
- Troubleshooting slow dashboards, caching issues, or Celery worker problems
- Configuring database connections (SQLAlchemy URIs, drivers, connection pools)
- Setting up security (RBAC, RLS, OAuth, LDAP)
- Deploying Superset on Kubernetes with the Helm chart
- Embedding dashboards in external applications
- Configuring `superset_config.py` or feature flags
- Diagnosing memory issues in Gunicorn or Celery workers
**Route back to parent when:**
- Question is about choosing between Superset and another BI tool (see the `overview` skill in this plugin)
- Question is about general data visualization theory or dimensional modeling (see the `overview` skill in this plugin)
- Question involves a different BI technology entirely
## How to Approach Tasks
1. **Classify** the request:
- **SQL Lab / queries** -- Load `references/architecture.md` for SQL Lab, Jinja templating, async queries, virtual datasets
- **Charts / visualization** -- Load `references/architecture.md` for chart types, ECharts plugin architecture, explore view
- **Dashboard design** -- Load `references/best-practices.md` for layout, native filters, cross-filtering, color, tabs
- **Database connectivity** -- Load `references/diagnostics.md` for SQLAlchemy URIs, drivers, connection pool tuning, troubleshooting
- **Caching** -- Load `references/diagnostics.md` for Redis configuration, cache debugging, GAQ setup
- **Performance** -- Load `references/diagnostics.md` for slow queries, dashboard loading, memory issues
- **Security / auth** -- Load `references/architecture.md` for RBAC, RLS, OAuth, LDAP, group-based ACL
- **Deployment** -- Load `references/best-practices.md` for Kubernetes Helm chart, Gunicorn, scaling, production checklist
- **Embedding** -- Load `references/architecture.md` for Embedded SDK, guest tokens, domain whitelisting
- **Celery / async** -- Load `references/diagnostics.md` for worker issues, task configuration, pool selection
2. **Identify version** -- Determine whether the user runs Superset 6.x (Ant Design v5, dark mode, theming, group-based ACL, distributed coordination) or 5.x. Key 6.0 features include the theming architecture, URL prefix deployment, hierarchical dataset folders, and Redis-based distributed locking.
3. **Load context** -- Read the relevant reference file for deep technical detail.
4. **Analyze** -- Apply Superset-specific reasoning. Consider deployment model (self-hosted vs Preset managed), database backend (which analytical DB), caching configuration, Celery setup, and user skill level (SQL-proficient data team vs non-technical users).
5. **Recommend** -- Provide actionable guidance with `superset_config.py` snippets, SQL examples, Helm values, feature flags, or Celery configuration.
6. **Verify** -- Suggest validation steps (health endpoints, Redis CLI checks, Celery inspect commands, browser DevTools, EXPLAIN ANALYZE on slow queries).
## Platform Overview
Apache Superset is a modern, open-source data exploration and visualization platform. It is a top-level Apache Software Foundation project (Apache 2.0 license) with 60,000+ GitHub stars and an active community. Preset (preset.io) offers a managed SaaS version.
### Current Version
**Apache Superset 6.0.0** (December 4, 2025) -- the most significant release in Superset's history. 155 contributors (101 first-time). Key features: Ant Design v5 overhaul, dark mode, theming architecture, group-based ACL, distributed coordination via Redis.
### Architecture Summary
```
┌──────────────────┐
│ Load Balancer │
│ (Nginx/ALB) │
└────────┬─────────┘
│
┌──────────────┼──────────────┐
│ │ │
┌────────▼───┐ ┌──────▼─────┐ ┌─────▼──────┐
│ Web Server │ │ Web Server │ │ Web Server │
│ (Gunicorn) │ │ (Gunicorn) │ │ (Gunicorn) │
└────────┬───┘ └──────┬─────┘ └─────┬──────┘
│ │ │
└──────────────┼──────────────┘
│
┌───────────────────┼───────────────────┐
│ │ │
┌──────▼──────┐ ┌──────▼──────┐ ┌───────▼───────┐
│ Metadata DB │ │ Redis │ │ Celery Workers │
│ (PostgreSQL)│ │ (Cache + │ │ + Beat │
│ │ │ Broker) │ │ │
└─────────────┘ └────────────┘ └────────────────┘
│
┌─────────▼─────────┐
│ Analytical DBs │
│ (Snowflake, BQ, │
│ ClickHouse, etc.) │
└────────────────────┘
```
- **Backend**: Flask + Flask-AppBuilder, SQLAlchemy ORM, REST API
- **Frontend**: React + Redux + Ant Design v5 + Apache ECharts
- **Metadata Store**: PostgreSQL (recommended), MySQL, or SQLite (dev only)
- **Caching**: Redis (recommended) via Flask-Caching, multi-tier
- **Async Processing**: Celery workers + Celery Beat scheduler
- **Message Broker**: Redis or RabbitMQ
## SQL Lab
Multi-tab SQL IDE with syntax highlighting, autocompletion, and inline result exploration.
### Key Features
- Async query execution via Celery for long-running queries
- Query history with saved queries and sharing
- Virtual dataset creation from SQL queries
- Query cost estimation (database-dependent)
- Jinja templating for dynamic SQL
### Jinja Templating
Enable via `ENABLE_TEMPLATE_PROCESSING` feature flag.
| Macro | Description |
|---|---|
| `{{ current_username() }}` | Currently logged-in username |
| `{{ current_user_id() }}` | Currently logged-in user ID |
| `{{ current_user_email() }}` | Currently logged-in user email |
| `{{ url_param('key') }}` | URL parameter value |
| `{{ filter_values('column') }}` | Active filter values for a column |
| `{{ from_dttm }}` / `{{ to_dttm }}` | Time range filter boundaries |
```sql
-- Parameterized query
-- Parameters: {"schema": "public", "limit": 100}
SELECT * FROM {{ schema }}.my_table LIMIT {{ limit }}
```
Custom Jinja context processors:
```python
JINJA_CONTEXT_ADDONS = {
"my_custom_macro": lambda: "custom_value",
}
```
## Chart Types and Visualization
40+ pre-installed visualization types via Apache ECharts plugin architecture:
| Category | Chart Types |
|---|---|
| Time Series | Line, Area, Bar, Scatter, Smooth Line, Step Line |
| Categorical | Bar Chart, Pie, Donut, Sunburst, Treemap |
| Distribution | Histogram, Box Plot, Violin Plot |
| Correlation | Scatter Plot, Bubble Chart, Heatmap |
| Geospatial | World Map, Country Map, deck.gl layers |
| Table | Table, Pivot Table, Time-series Table |
| Flow | Sankey, Chord Diagram |
| Statistical | Big Number, Big Number with Trendline |
| Other | Calendar Heatmap, Word Cloud, Funnel, Gauge, Radar, Waterfall |
Charts are npm packages following a plugin interface -- custom charts can be developed and registered.
## Dashboard Features
- Drag-and-drop grid-based layout builder with responsive design
- **Native filters**: filter bar with value, time range, numerical range; cascading/dependent filters; filter scoping
- **Cross-filtering**: click chart elements to filter entire dashboard
- Tabs and nested tabs for content organization
- Markdown components for text, images, and HTML
- Periodic auto-refresh at configurable intervals
- Dashboard-level CSS overrides
- Export/import as JSON for version control
- Certification workflow for verified dashboards
- Dark mode support (6.0)
## Database Connectivity (50+)
Connects via SQLAlchemy + database-specific drivers. Drivers must be installed separately.
| Category | Databases |
|---|---|
| Cloud Warehouses | Snowflake, BigQuery, Redshift, Databricks, Azure Synapse |
| OLAP Engines | ClickHouse, Apache Druid, Apache Pinot, StarRocks, Doris, Firebolt |
| Query Engines | Trino, Presto, Apache Hive, Spark SQL, Dremio |
| RDBMS | PostgreSQL, MySQL, SQL Server, Oracle, DB2, MariaDB, CockroachDB |
| Embedded | DuckDB, SQLite |
### Common Driver Packages
| Database | PyPI Package |
|---|---|
| PostgreSQL | `psycopg2-binary` |
| MySQL | `mysqlclient` |
| Snowflake | `snowflake-sqlalchemy` |
| BigQuery | `sqlalchemy-bigquery` |
| ClickHouse | `clickhouse-connect` |
| Trino | `trino` |
| Redshift | `sqlalchemy-redshift` |
| Databricks | `databricks-sql-connector` |
| SQL Server | `pymssql` |
| DuckDB | `duckdb-engine` |
## Security Model
### Authentication
| Method | Config Key |
|---|---|
| Database (built-in) | `AUTH_DB` |
| LDAP | `AUTH_LDAP` |
| OAuth 2.0 | `AUTH_OAUTH` |
| OpenID Connect | `AUTH_OID` |
| Remote User (header SSO) | `AUTH_REMOTE_USER` |
### RBAC
| Role | Access Level |
|---|---|
| Admin | Full system access, user management, all data sources |
| Alpha | All data sources, create charts/dashboards, no admin |
| Gamma | Only explicitly granted data sources |
| sql_lab | SQL Lab access (combinable with other roles) |
| Public | Unauthenticated access (disabled by default) |
Group-Based Access Control (6.0): assign roles to user groups, group-based access for databases/datasources/schemas.
### Row-Level Security (RLS)
SQL filter clauses applied per role or user:
```python
# Users only see their department's data
# RLS Rule: department_id = {{ current_user_id() }}
```
### OAuth Role Mapping
```python
AUTH_ROLES_MAPPING = {
"superset_users": ["Gamma", "sql_lab"],
"superset_admins": ["Admin"],
"data_analysts": ["Alpha", "sql_lab"],
}
AUTH_ROLES_SYNC_AT_LOGIN = True
```
## Embedding
### Embedded SDK
- JavaScript SDK: `@superset-ui/embedded-sdk`
- iframe-based embedding with guest tokens (JWT + RLS)
- Custom styling via CSS overrides
- Domain whitelisting for security
### Guest Token Flow
1. Host application authenticates user
2. Backend requests guest token from Superset API with user permissions and RLS clauses
3. Guest token passed to Embedded SDK in the frontend
4. SDK renders Superset dashboard in iframe with enforced permissions
## Caching
### Multi-Tier Architecture
| Cache | Purpose | Configuration Key |
|---|---|---|
| Metadata | Database metadata, table lists | `CACHE_CONFIG` |
| Data/Chart | Query results for rendering | `DATA_CACHE_CONFIG` |
| Filter State | Active filter selections | `FILTER_STATE_CACHE_CONFIG` |
| Explore Form | Chart explore form state | `EXPLORE_FORM_DATA_CACHE_CONFIG` |
| SQL Lab Results | Async query result storage | `RESULTS_BACKEND` |
| Thumbnails | Dashboard/chart previews | `THUMBNAIL_CACHE_CONFIG` |
Redis is recommended for all production caches. Use separate Redis databases for independent eviction policies.
## Feature Flags
```python
FEATURE_FLAGS = {
"ENABLE_TEMPLATE_PROCESSING": True, # Jinja templating
"DASHBOARD_CROSS_FILTERS": True, # Cross-filtering
"DASHBOARD_NATIVE_FILTERS": True, # Native filter bar
"EMBEDDED_SUPERSET": True, # Dashboard embedding
"ALERT_REPORTS": True, # Alerts and reports
"GLOBAL_ASYNC_QUERIES": True, # Async chart rendering
"DASHBOARD_VIRTUALIZATION": True, # Virtual scroll
"DRILL_BY": True, # Drill-by
"DRILL_TO_DETAIL": True, # Drill-to-detail
}
```
## Semantic Layer
### Current Approach (Thin)
- **Physical Datasets**: Direct mapping to a database table or view
- **Virtual Datasets**: Defined by a SQL query (from SQL Lab)
- Each dataset defines: metrics (aggregation expressions), calculated columns (SQL-derived), column metadata, certification
### SIP-182 (Proposed)
Active proposal for deeper semantic layer integration with external tools (Cube, dbt Semantic Layer, Metricflow) via an "Explorable" Python protocol.
## Anti-Patterns
1. **"SQLite in production."** SQLite does not support concurrent writes and will cause data corruption under load. Use PostgreSQL for the metadata database in any non-development deployment.
2. **"No caching configured."** Without Redis caching, every dashboard load hits the analytical database. Configure `DATA_CACHE_CONFIG` at minimum. Dashboards serving the same data repeatedly should use cache timeouts matched to ETL refresh frequency.
3. **"In-memory cache with Global Async Queries."** GAQ requires Redis for consistency between web processes and Celery workers. In-memory cache is per-process and invisible to other processes. Always use Redis as the results backend when GAQ is enabled.
4. **"Celery prefork pool on Kubernetes."** The default prefork pool spawns child processes that can exceed pod memory limits, causing OOMKilled restarts. Use `--pool solo` or `--pool gevent` for Kubernetes deployments.
5. **"SELECT * in virtual datasets."** Selecting all columns transfers unnecessary data and prevents index optimization. Specify only needed columns, apply WHERE clauses, and consider materializing complex queries as views.
6. **"No query timeouts."** Without `SQLLAB_TIMEOUT` and database-level timeouts, runaway queries consume warehouse resources indefinitely. Set reasonable timeouts and enable async queries for SQL Lab.
7. **"Public role enabled without restriction."** The Public role grants unauthenticated access. Never enable it without carefully restricting permissions, especially in internet-facing deployments.
8. **"No Gunicorn worker recycling."** Gunicorn workers can grow in memory over time due to Python memory fragmentation. Set `--max-requests=1000 --max-requests-jitter=50` to periodically respawn workers.
## Reference Files
Load these for deep technical detail:
- `references/architecture.md` -- Flask/React stack, SQL Lab (async queries, Jinja templating), chart types (ECharts plugin), dashboards (native filters, cross-filtering), database connectivity (SQLAlchemy, drivers), caching (Redis multi-tier, GAQ), security (RBAC, RLS, OAuth/LDAP), embedding (SDK, guest tokens), deployment architecture (Kubernetes Helm chart)
- `references/best-practices.md` -- Dashboard design (layout, filter strategy, cross-filtering), SQL Lab usage (virtual datasets, parameterized queries), chart performance, database optimization (connection pools, data modeling), caching strategy (timeouts, warm-up, Redis config), Kubernetes deployment at scale (Helm values, HPA, HA), security configuration (production hardening, authentication, RLS), monitoring (StatsD, logging)
- `references/diagnostics.md` -- Slow query diagnosis (EXPLAIN ANALYZE, query patterns), dashboard loading issues (filter bottlenecks, frontend profiling), caching problems (Redis connectivity, GAQ debugging), database connection troubleshooting (drivers, SSL, pool health), Celery worker issues (OOMKilled, stuck tasks, pool selection), memory management (Gunicorn, Celery, Kubernetes resources)
Files in this skill
- SKILL.md
- references/architecture.md
- references/best-practices.md
- references/diagnostics.md
Attribution
Comments
Loading comments…