Skip to main content

Installation

We can get from zero to a working report in superset in about 10 minutes. The installation requires some dependencies and the use of command-line tools. This tutorial walks you through the process, shows the commands and explains each step.

In short, we will cover the following steps:

  • Install the coasti CLI.
  • Initialize a new coasti project folder.
  • Setup our Superset docker container.
  • Add a demo content package and run its setup to prepare local configuration.
  • Execute the transformation pipeline to get the BI data ready and deploy it to Superset.
  • Upload the packages frontend assets to Superset.
note

For production deployments, we set up coasti so that superset runs on a different machine than the transformations. This way, expensive computations of the data-pipeline do not affect the user experience. For simplicity, we put both on the same host in this tutorial.

Requirements​

  • docker
  • git
  • uv (used in this tutorial, but most python package managers will do)
  • Full Requirements: a broader overview, hardware, and more details.

Get the coasti installer​

The coasti installer is a small python package that wraps around existing open-source tools. It allows us to create and manage coasti projects, set up version control, and to add or update content.

The easiest way to get the coasti installer is through uv:

curl -LsSf https://astral.sh/uv/install.sh | sh

uv tool install coasti

To check it worked, try the help option:

Initialize a coasti project​

All products, content and metadata that you use with coasti live in a central folder, a coasti project. Projects are initialized via coasti init and you need to provide a folder path to use.

We recommend to use an absolute and simple path like /coasti. This makes it a bit easier to map configs into containers, where it helps to use the same paths inside and out.

Install Apache Superset​

With the coasti project set up, we can add superset as a product. We provide a batteries-included docker image that streamlines the installation.

First, coasti asks a few questions on how to get the product. This lets you choose which branch to use (products are just git repositories) or how to gain access, if your product is in a private repo. Because superset is in a public repo, we dont need authentication.

After adding superset as a product to coasti's metadata, we are asked to install it. We can either do this directly (type y or ↵) or install later via coasti product install.

This will clone the repository, and guide us through the questions needed to configure superset. For most questions, choosing the default by pressing ↵ is fine.

You can later check the details based on your answers in /coasti/products/superset_docker/config/.env.

To launch superset, we follow the suggested next steps. This will download the docker image, and launch the container.

To launch superset, we follow the suggested next steps. This will download the docker image, and launch the container.

Now, we can open a browser and navigate to http://localhost:8088 to login with the credentials we entered earlier.

Superset Landing Page

With the up command we just used, we launched the superset-app container and attached to it. This directly shows all output in the Terminal. To stop the container, and return to our shell, we can press ctrl + c.

If we want the superset containers to run in the background, we can start detached by using docker compose up -d

docker compose -f ./docker/docker-compose.yml --env-file ./config/.env up -d superset-app

Adding content and running dbt​

Now that we have superset up and running, let's add some reports.

Here, we use the demo package that shows a few selected stats from Destatis.

To get us started quickly, the example already contains raw data, so that we do not need an ingestion and can omit the download step. However, we still need to run the transformations that will create the BI data for our reports.

The following command is the bread-and butter step of a the content package. In a production setup, it would run regularly, e.g. every night, to fetch new raw data, process it, and update the BI data visible in the reports.

This created the following files for us:

  • ./data/lfgs_etl.duckdb The large duckdb that contains a copy of the ingestion data and our transformation output. This is the final BI data (placed in the mart and presentation layers).
  • ./data/lfgs_etl_mini.db A smaller duckdb, that only contains those final layers of BI data.
  • A copy of this _mini.db, located in supersets data directory. This is where our frontend reports will look for it (file name and location have to match).

Deploying content frontend to superset​

Now that we have data in superset, we want to show the preconfigured reports in superset. Usually, they come as part of the content package and follow supersets format (that is, yaml files with a certain structure).

In the demo content package, these yaml files live at superset/frontend (click here to get a feeling for what they look like).

To upload the assets into superset, we use the superset-io tool that is part of coasti:

The upload should finish after a few seconds, and the reports should show up in superset:

Genesis Stats Screenshot