← 返回
未分类

Superset troubleshoot

Diagnose and fix Superset infrastructure errors that require server-side access. Covers Invalid decryption key, Dashboard layout TypeError, SQL Lab hanging, Databricks token update, virtual dataset column sync. Use when REST API alone cannot fix the problem or when the user reports server-side Superset errors. Triggers: decryption key, InvalidToken, TypeError width, SQL Lab hang, token expired, container restart, column sync.
Diagnose and fix Superset infrastructure errors that require server-side access. Covers Invalid decryption key, Dashboard layout TypeError, SQL Lab hanging, Databricks token update, virtual dataset column sync. Use when REST API alone cannot fix the problem or when the user reports server-side Superset errors. Triggers: decryption key, InvalidToken, TypeError width, SQL Lab hang, token expired, container restart, column sync.
user_1f020d8e
未分类 community v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 23
下载
💾 0
安装
1
版本
#latest

概述

Superset Troubleshooting

Server-side fixes requiring shell access to the Superset host.

1. Invalid Decryption Key

Error: Invalid decryption key or InvalidToken

Cause: SECRET_KEY changed, encrypted fields in dbs table unreadable.

Fix — run in Superset container:

# Clear encrypted fields
psql -U <db_user> -d <db_name> -c \
  "UPDATE dbs SET encrypted_extra = NULL, password = NULL, server_cert = NULL"

# Clear key_value cache
psql -U <db_user> -d <db_name> -c \
  "DELETE FROM key_value"

# Restart Superset service

Then clear browser cache or use incognito.

2. Dashboard TypeError: Cannot read 'width'

Error: TypeError: Cannot read properties of undefined (reading 'width')

Cause: position_json missing ROW > COLUMN > CHART hierarchy.

Fix: Rebuild position_json. For correct format, see superset-api skill "Dashboard Layout" section.

Run a fix script inside the Superset container:

python /tmp/fix_layout.py

3. viz_type Not Registered

Error: Item with key "scatter_chart" is not registered

Fix: Replace old viz_type. For mapping, see superset-api skill "Available viz_type" section.

Can be fixed via REST API (no server access needed). Use superset-api skill.

4. Pie Chart Label Undefined

Error: Cannot read properties of undefined (reading 'label')

Cause: pie uses metric (singular object), not metrics (plural array).

Fix: Change metrics to metric in chart params. Can be done via REST API.

5. Virtual Dataset Columns Missing

Error: Missing columns in datasource: ['xxx']

Two causes:

  1. datasource_id mismatch — Chart points to wrong dataset. Fix via REST API.
  2. Column cache stale — SQL changed but columns not synced. Run inside Superset container:
from superset import create_app, db
from superset.connectors.sqla.models import SqlaTable
app = create_app()
with app.app_context():
    ds = db.session.query(SqlaTable).filter_by(id=DATASET_ID).first()
    for col in ds.columns:
        db.session.delete(col)
    ds.sync_columns_from_metadata(db.session)
    db.session.commit()
    print('Synced')

6. SQL Lab Hanging

Cause: No Celery worker but allow_run_async=True.

Fix — run inside Superset container:

from superset import create_app, db
from superset.models.core import Database
app = create_app()
with app.app_context():
    d = db.session.query(Database).filter_by(database_name='<database_name>').first()
    d.allow_run_async = False
    db.session.commit()

7. Databricks Token Update

Must update password field (not encrypted_extra):

from superset import create_app, db
from superset.models.core import Database
app = create_app()
with app.app_context():
    d = db.session.query(Database).filter_by(database_name='<database_name>').first()
    d.password = '<new_token>'
    db.session.commit()
    print('Updated')

General Notes

  • All Python scripts above should be run inside the Superset application context (container or virtualenv).
  • All psql commands require access to the Superset metadata database.
  • Restart the Superset service after making config or database changes.
  • deploy/.env and similar env files contain secrets — do NOT commit to git.

版本历史

共 1 个版本

  • v1.0.0 Initial release 当前
    2026-06-05 14:38 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 672 📥 324,506
security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,219 📥 266,840
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,363 📥 319,027