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

> Learn about connecting Apache Superset to Firebolt Core.

# Apache Superset with Firebolt Core

[Apache Superset](https://superset.apache.org) is an open-source data exploration and visualization platform that empowers users to create interactive, shareable dashboards and charts for analyzing and presenting data. It supports a wide range of data sources and provides an intuitive, web-based interface for data exploration, slicing, and dicing, with features like dynamic filtering, pivot tables, and drag-and-drop functionality. Superset also offers a rich set of visualization options and can be extended through custom plugins, making it a versatile tool for data analysts and business users to gain insights from their data and collaborate effectively.

## Prerequisites

Superset can be installed in several ways, including using a pre-built [Docker container](https://superset.apache.org/docs/installation/docker-compose), building it from [source](https://superset.apache.org/docs/installation/pypi) or deploying via [Kubernetes Helm chart](https://superset.apache.org/docs/installation/kubernetes).

The easiest way to get started is to run Superset via Docker.

You will need:

* [Docker](https://www.docker.com/) and [Docker Compose](https://docs.docker.com/compose/).
* [Git](https://git-scm.com/).
* A running Firebolt Core instance. See the [Firebolt Core getting started guide](/firebolt-core/firebolt-core-get-started) for setup instructions.

## Quickstart

Follow this guide to setup Superset and connect it to your Firebolt Core instance.

### Setup Superset

1. Clone Superset's GitHub [repository](https://github.com/apache/superset)

```shell theme={"theme":{"light":"github-light","dark":"github-dark"}}
git clone https://github.com/apache/superset.git
```

2. Change directory to the root of the newly cloned repository and add the Firebolt driver

```shell theme={"theme":{"light":"github-light","dark":"github-dark"}}
cd superset
touch ./docker/requirements-local.txt
echo "firebolt-sqlalchemy" >> ./docker/requirements-local.txt
```

3. Run Superset via Docker Compose

```shell theme={"theme":{"light":"github-light","dark":"github-dark"}}
docker compose -f docker-compose-non-dev.yml up
```

4. (Optional) Verify firebolt driver is present in Superset container

```shell theme={"theme":{"light":"github-light","dark":"github-dark"}}
docker exec -it <container_name> bash
pip freeze | grep firebolt
```

You should see `firebolt-sqlalchemy` in the output.

Once your Superset is booted up you should be able to access it in `http://localhost:8088/`

<Note>
  For more installation details, refer to [Adding New Database Drivers in Docker](https://superset.apache.org/docs/configuration/databases#installing-drivers-in-docker-images) in the Superset documentation.
</Note>

### Setup Firebolt Core connection

After the initial setup in Superset User Interface head to the **Settings -> Database connections** in the top right corner.

<img src="https://mintcdn.com/firebolt/wU8j7Hl1Gi7TGWM5/assets/images/superset-settings.png?fit=max&auto=format&n=wU8j7Hl1Gi7TGWM5&q=85&s=fa6318a20c625680b4dcafbd15ff3cba" alt="Database Connections" width="30%" data-path="assets/images/superset-settings.png" />

On the next screen, press the **+ Database** button and select Firebolt from the dropdown. If you don't see Firebolt in the list, please refer to the [Setup Superset](#setup-superset) section for instructions on how to install the Firebolt driver and verify that the driver is present.

<img src="https://mintcdn.com/firebolt/wU8j7Hl1Gi7TGWM5/assets/images/superset-connect-a-database.png?fit=max&auto=format&n=wU8j7Hl1Gi7TGWM5&q=85&s=272903280d1c29327ababb557f7587a2" alt="Connect database" width="30%" data-path="assets/images/superset-connect-a-database.png" />

The connection expects a SQLAlchemy connection string of the form:

```
firebolt://{database}?url={url}
```

Where:

* `{database}` is your Firebolt Core database name (default is `firebolt`)
* `{url}` is the fully qualified URL where your Firebolt Core instance is hosted (default is `http://localhost:3473`)

For a local Firebolt Core instance running with default settings, the connection string would be:

```
firebolt://firebolt?url=http://localhost:3473
```

<Note>
  Unlike Firebolt Cloud, Firebolt Core does not require authentication credentials (client\_id, client\_secret, or account\_name) in the connection string since it's designed for self-hosted environments.
</Note>

<img src="https://mintcdn.com/firebolt/wU8j7Hl1Gi7TGWM5/assets/images/superset-firebolt-core-uri.png?fit=max&auto=format&n=wU8j7Hl1Gi7TGWM5&q=85&s=06a029a92bc6bd80f3bda7fb262219d6" alt="Credentials" width="30%" data-path="assets/images/superset-firebolt-core-uri.png" />

Click the **Test Connection** button to confirm things work end to end. If the connection looks good, save the configuration by clicking the **Connect** button in the bottom right corner of the modal window.
Now you're ready to start using Superset with Firebolt Core!

### Build your first chart

<Note>
  This section assumes you have loaded sample data into your Firebolt Core database. For guidance on loading data, see the [Firebolt Core data processing guide](/firebolt-core/firebolt-core-data-processing).
</Note>

Now that you've configured Firebolt Core as a data source, you can select specific tables (Datasets) that you want to see in Superset.

Go to **Data -> Datasets** and select **+ Dataset**. There you can select your sample table by specifying Firebolt as your Database, your schema and the table name you chose.

<img src="https://mintcdn.com/firebolt/wU8j7Hl1Gi7TGWM5/assets/images/superset-dataset-config.png?fit=max&auto=format&n=wU8j7Hl1Gi7TGWM5&q=85&s=fc859a14b2b8bc810020e17ea0828247" alt="Dataset" width="318" height="323" data-path="assets/images/superset-dataset-config.png" />

Press **Create Dataset and Create Chart**. On the next screen you can select your desired chart type. For this tutorial we will go with a simple Bar Chart.

<img src="https://mintcdn.com/firebolt/wU8j7Hl1Gi7TGWM5/assets/images/superset-char-type-select.png?fit=max&auto=format&n=wU8j7Hl1Gi7TGWM5&q=85&s=93ce4b6bf844b84135a7c734a9713db0" alt="Chart type" width="1116" height="680" data-path="assets/images/superset-char-type-select.png" />

In the next screen you can drag and drop your table columns into Metrics and Dimensions, specify filters or sorting orders. Configure your chart according to your data and requirements.

<img src="https://mintcdn.com/firebolt/wU8j7Hl1Gi7TGWM5/assets/images/superset-sample-chart.png?fit=max&auto=format&n=wU8j7Hl1Gi7TGWM5&q=85&s=2f84f0f1f88e267cb30ee429cca3c4d6" alt="Chart" width="2253" height="1200" data-path="assets/images/superset-sample-chart.png" />

Your first chart is ready! You can now save it, add more data to it or change its type. You can also start building a dashboard with different charts telling a story. Learn more about this functionality and more by following the links below.

## Further reading

* [Creating your first Dashboard](https://superset.apache.org/docs/creating-charts-dashboards/creating-your-first-dashboard).
* [Exploring data](https://superset.apache.org/docs/creating-charts-dashboards/exploring-data).
* [Firebolt Core documentation](/firebolt-core) for more information about self-hosted Firebolt.
* [Preset](https://preset.io/) - managed Superset for Firebolt Cloud integration.
