> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nx1cloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Superset in NexusOne

> Overview of Apache Superset, a BI and dashboarding interface in NexusOne.

Superset serves as the primary BI and dashboarding interface within the NexusOne
platform. It uses OAuth 2.0 for authentication and relies on an external
PostgreSQL database for metadata storage.

For caching and asynchronous task handling, Superset uses Redis, with additional
configuration applied through custom Python overrides.

## Environment configuration

This section describes how the NexusOne team configured Superset.

### Accessing the Superset UI

Superset provides a web-based interface to interact with it. You can access the
Superset UI on NexusOne using the following URL:

```bash theme={null}
https://superset.<client>.nx1cloud.com
```

<Note>
  When you purchase NexusOne, you receive a client name.
  Replace `client` with your assigned client name.
</Note>

After visiting the URL, enter your NexusOne credentials to log in.

### Trino integration

Within NexusOne, Superset connects to Trino and treats each catalog
connected to Trino as a database. Within each catalog, you can query
schemas and tables in SQL Lab, or select them for chart creation.

Since NexusOne configured an Iceberg and Hive catalog within its Trino
environment, it appears automatically in Superset without additional setup.

### Authentication and authorization

Superset uses OAuth 2.0 for authentication. After navigating to the
[previously mentioned URL](#accessing-the-superset-ui), you must enter the
credentials assigned to you when you purchased NexusOne to be successfully
authenticated.

For authorization, Superset controls user access to perform specific actions
using role-based permissions in KeyCloak.

### Backend database

Within NexusOne, Superset uses a PostgreSQL database to store metadata about
dashboards and charts.

NexusOne ensures that a dedicated Superset database
is available and that Superset can connect to it using the appropriate host,
user, and password settings. This provides a reliable and persistent backend
for all Superset metadata.

## Superset UI and SQL Lab

Superset provides an intuitive interface for both technical and non-technical
users to explore data, write SQL, and build visualizations.

Two major components of the user experience are SQL Lab and the Superset UI.
Together, they enable query development, dataset preparation, and dashboard
creation directly from a web browser.

### Superset UI overview

The Superset UI makes navigation and analytics simple. You can move between
dashboards, datasets, SQL Lab, and chart creation through a clear layout.

<Card img="https://mintcdn.com/nexusone-4c77570d/zx5BUy8mucQPmWMh/images/platform-components/apache-superset/01-superset-homepage.png?fit=max&auto=format&n=zx5BUy8mucQPmWMh&q=85&s=385c3253b73b172d42cdc09b08910439" width="2098" height="1080" data-path="images/platform-components/apache-superset/01-superset-homepage.png">
  Superset homepage
</Card>

#### Navigation bar

At the top of the Superset UI, the navigation bar provides quick access to
all major features, such as:

* `Dashboards`: Lists all dashboards available to you and allows you to manage them.
* `Charts`: Lists all saved charts and allows you to manage them.
* `Datasets`: Lists all available datasets created from SQL Lab or imported from
  catalogs in Trino. Charts and dashboards use these datasets as sources.
* `SQL`: A dropdown menu that includes:
  * `SQL Lab`: An SQL editor used to write and execute queries.
  * `Saved Queries`: Previously stored SQL statements for reuse.
  * `Query History`: Logs of past executed queries for reference or re-execution.
* `+`: A quick-access button for creating new charts, dashboards, or datasets,
  depending on your configuration.
* `Settings`: User account options, including profile information, theme
  preferences, and language settings.

These features act as the central entry point for accessing all exploration,
visualization, and account-related features within Superset.

#### Main UI sections

The center page of the Superset UI provides summarized access to Superset features,
such as:

* `Recents`: Displays items you have interacted with recently. It includes
  the following three tabs:
  * `Viewed`: Recently viewed dashboards or charts
  * `Edited`: Items recently modified
  * `Created`: Items recently created
* `Dashboards` and `Charts`: It includes the following three tabs:
  * `Favorite`: Dashboards or charts marked as favorites
  * `Mine`: Dashboards or charts created by the user
  * `All`: All visible dashboards or charts. You can also create a new chart or
    dashboard using the **+ Dashboard** or **+ Chart** option.
* `Saved Queries`: Contains SQL queries you previously saved from SQL Lab. You can also
  create a new SQL query using the **+ SQL query** option.

### SQL Lab overview

SQL Lab is Superset's built-in SQL editor, designed for interactive data exploration.
It allows you to run queries against catalogs in Trino, preview results, and transform
them into reusable datasets.

To access SQL Lab, use the following steps:

1. At the top-left navigation bar of the Superset UI page, click the **SQL** menu.
2. From the dropdown, select **SQL Lab**.

<Card img="https://mintcdn.com/nexusone-4c77570d/Go9bGnZeL5EGSoDm/images/platform-components/apache-superset/02-sql-lab.png?fit=max&auto=format&n=Go9bGnZeL5EGSoDm&q=85&s=e97a67360500a255a06e54761f5152ae" width="2872" height="1732" data-path="images/platform-components/apache-superset/02-sql-lab.png">
  SQL Lab in Superset
</Card>

#### Key capabilities

* **Multi-catalog access via Trino**: Each catalog in Trino appears as a database
  in SQL Lab. This allows you to query Iceberg, Hive, or other sources without
  additional configuration.
* **Autocomplete and schema browser**: SQL Lab provides interactive schema exploration.
  You browse catalogs, schemas, and tables before writing queries.
* **Result previews**: Query results appear instantly in a preview grid, allowing quick
  inspection before saving.
* **Save queries and create datasets**: You can do the following:
  * Save a query for future reuse
  * Convert SQL output into a named dataset for use in charts
* **Async execution and task offloading**: Within NexusOne, Redis and other configured
  Celery workers handle background execution. This enables long-running queries.

## Additional resources

* To learn practical ways to use Superset in the NexusOne environment, refer to the
  [Superset hands-on examples](./superset-hands-on-examples) page.
* For more details about Superset, refer to the [Superset](https://superset.apache.org/docs/intro)
  official documentation.
* To learn more about how NexusOne uses KeyCloak and Trino, refer to the
  [NexusOne KeyCloak](../keycloak) and [Trino](../trino) documentation.
