Superset Query Export

Export the compiled SQL behind every Superset dashboard chart into project-local reference files and a manifest for project context

datus-ai 0abaeb9 1.0 KB Updated

File contents

Superset Query Export

Run:

datus superset context export-dashboard <dashboard-id>

The default destination is reference_sql/superset/<dashboard-slug>/. It contains one compiled query per .sql file, redacted source JSON under _source/, and manifest.json with dashboard/chart identity, datasource, variables, checksum, and per-query status. Existing output is protected; use --overwrite only after reviewing the destination. Add --include-hidden when hidden charts are intentionally part of context.

After export, inspect manifest.json. A nonzero failed count means context is partial; report affected charts. SQL templates/macros are retained where Superset returns them. Never replace failed entries with guessed SQL. Use the files as project-level reference context, not as proof that queries are safe or executable against another database.

datus-ai/datus-plugins/tree/main/datus-superset-plugin/datus_superset_plugin/skills/superset-query-export commit 0abaeb9977

Frequently asked questions

npx skillmds@latest add datus-ai/superset-query-export