Joe Li 7ca048a0eb feat(subdirectory): implement application root URL helpers and backend normaliser
Green commit for the subdirectory deployment refactor. All five layers of
the test suite scaffolded in 13f56f710e are now actionable:

- Layers 1, 3, 5 (previously red) now pass against real implementations.
- Layer 2 (invariant) remains green — no new ensureAppRoot/makeUrl imports.
- Layer 4 (contract) remains green — SupersetClient applies the root once.

Implementations
- src/utils/navigationUtils.ts:
  - openInNewTab(path) — window.open with noopener noreferrer
  - redirect(path) — window.location.href assignment
  - redirectReplace(path) — window.location.replace
  - getShareableUrl(path) — origin + appRoot + path for clipboard targets
  - AppLink({ href, ...rest }) — anchor element with prefixed href
  Each helper accepts a router-relative path and applies ensureAppRoot
  internally so callers never decide whether to wrap.

- packages/superset-ui-core/src/connection/normalizeBackendUrls.ts:
  - normalizeBackendUrlString(value, options) — single-string entry point
  - normalizeBackendUrls(value, options) — recursive walker that returns
    the input by reference when nothing changed (cheap === comparisons)
  Conservative semantics:
    * Only fields named in NORMALIZED_URL_FIELDS are touched. Initial set:
      `explore_url`. Follow-up commits expand it after per-endpoint audit.
    * Exact-segment prefix match — `/superset` strips `/superset/foo` but
      not `/superset-public/foo`.
    * Absolute and protocol-relative URLs pass through unchanged.
    * Empty applicationRoot is a no-op.
    * Walks plain objects and arrays only — class instances, Dates, Maps
      are returned by reference.

Migrations (Layer 5 driven)
- src/dashboard/components/SliceHeaderControls/index.tsx:267 swaps
  `window.open(props.exploreUrl, '_blank')` for
  `openInNewTab(props.exploreUrl)`. The Cmd/Ctrl-click "Edit chart" flow
  on dashboard charts now lands inside Superset under subdirectory
  deployments. The Layer 5 regression test at
  SliceHeaderControls.subdirectory.test.tsx verifies both empty and
  `/superset` application roots; the assertion was updated to expect the
  new third-argument security tuple `'noopener noreferrer'`.

Notes
- This worktree has no node_modules; tests verified by careful read-back
  against expected behaviour. CI on the open draft PR is the source of
  truth.
- Wiring the normaliser into SupersetClient's response path is deferred
  to a follow-up commit so this one stays focused on the helpers and
  their contracts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 15:16:35 -07:00
2025-12-04 13:18:34 -05:00

Superset

License Latest Release on Github Build Status PyPI version PyPI GitHub Stars Contributors Last Commit Open Issues Open PRs Get on Slack Documentation

Superset logo (light)

A modern, enterprise-ready business intelligence web application.

Documentation

  • User Guide — For analysts and business users. Explore data, build charts, create dashboards, and connect databases.
  • Administrator Guide — Install, configure, and operate Superset. Covers security, scaling, and database drivers.
  • Developer Guide — Contribute to Superset or build on its REST API and extension framework.

Why Superset? | Supported Databases | Release Notes | Get Involved | Resources | Organizations Using Superset

Why Superset?

Superset is a modern data exploration and data visualization platform. Superset can replace or augment proprietary business intelligence tools for many teams. Superset integrates well with a variety of data sources.

Superset provides:

  • A no-code interface for building charts quickly
  • A powerful, web-based SQL Editor for advanced querying
  • A lightweight semantic layer for quickly defining custom dimensions and metrics
  • Out of the box support for nearly any SQL database or data engine
  • A wide array of beautiful visualizations to showcase your data, ranging from simple bar charts to geospatial visualizations
  • Lightweight, configurable caching layer to help ease database load
  • Highly extensible security roles and authentication options
  • An API for programmatic customization
  • A cloud-native architecture designed from the ground up for scale

Screenshots & Gifs

Video Overview

superset-video-1080p.webm


Large Gallery of Visualizations


Craft Beautiful, Dynamic Dashboards


No-Code Chart Builder


Powerful SQL Editor


Supported Databases

Superset can query data from any SQL-speaking datastore or data engine (Presto, Trino, Athena, and more) that has a Python DB-API driver and a SQLAlchemy dialect.

Here are some of the major database solutions that are supported:

Amazon Athena   Amazon DynamoDB   Amazon Redshift   Apache Doris   Apache Drill   Apache Druid   Apache Hive   Apache Impala   Apache Kylin   Apache Pinot   Apache Solr   Apache Spark SQL   Ascend   Aurora MySQL (Data API)   Aurora PostgreSQL (Data API)   Azure Data Explorer   Azure Synapse   ClickHouse   Cloudflare D1   CockroachDB   Couchbase   CrateDB   Databend   Databricks   Denodo   Dremio   DuckDB   Elasticsearch   Exasol   Firebird   Firebolt   Google BigQuery   Google Sheets   Greenplum   Hologres   IBM Db2   IBM Netezza Performance Server   MariaDB   Microsoft SQL Server   MonetDB   MongoDB   MotherDuck   OceanBase   Oracle   Presto   RisingWave   SAP HANA   SAP Sybase   Shillelagh   SingleStore   Snowflake   SQLite   StarRocks   Superset meta database   TDengine   Teradata   TimescaleDB   Trino   Vertica   YDB   YugabyteDB

A more comprehensive list of supported databases along with the configuration instructions can be found here.

Want to add support for your datastore or data engine? Read more here about the technical requirements.

Installation and Configuration

Try out Superset's quickstart guide or learn about the options for production deployments.

Get Involved

Contributor Guide

Interested in contributing? Check out our Developer Guide to find resources around contributing along with a detailed guide on how to set up a development environment.

Resources

Understanding the Superset Points of View

Repo Activity

Performance Stats of apache/superset - Last 28 days
Languages
TypeScript 40.5%
Python 33.6%
Jupyter Notebook 22.5%
HTML 2.7%
JavaScript 0.4%
Other 0.2%