Use Superset to visualize data
Use Apache Superset to query and visualize data in InfluxDB 3 Core.
Apache Superset is a modern, enterprise-ready business intelligence web application. It is fast, lightweight, intuitive, and loaded with options that make it easy for users of all skill sets to explore and visualize their data, from simple pie charts to highly detailed deck.gl geospatial charts.
Apache Superset only supports SQL. You can not use Superset to query InfluxDB 3 Core with InfluxQL.
- Set up Docker for Superset and Flight SQL
- Start the Superset Docker containers
- Log in to Superset
- Create a database connection for InfluxDB
- Query InfluxDB with Superset
- Build visualizations with Superset
Set up Docker for Superset and Flight SQL
Install prerequisites
We recommend using Docker and docker-compose to run Superset. To set up Superset to run in Docker containers with Flight SQL, follow these steps:
Superset is not officially supported on Windows. For more information about running Superset with Windows and Docker, see the Superset documentation.
-
Follow the instructions to download and install Docker and docker-compose for your system:
- macOS: Install Docker for macOS
- Linux: Install Docker for Linux
-
Follow the Python.org Downloading Python instructions for your system.
-
Once you’ve installed Python, check that you can run Python and Pip. Depending on your system, you may need to use the Python version 3 (
python3andpip3) commands. Enter the following commands into your terminal:If neither
pipnorpip3works, follow one of the Pypa.io Pip Installation methods for your system. -
Use Pip to install the
flightsql-dbapilibrary.The
flightsql-dbapilibrary for Python provides a DB API 2 interface and SQLAlchemy dialect for Flight SQL. Later, you’ll addflightsql-dbapito Superset’s Docker configuration.The
flightsql-dbapilibrary is experimental and under active development. The APIs it provides could change at any time. -
Use Git to clone the Apache Superset repository:
git clone https://github.com/apache/superset.gitThe repository contains Superset code and configuration files for running Superset in Docker containers.
Set up Docker for Superset
-
Change to your superset repository directory:
cd ./superset -
In your text editor or terminal, create the file
./docker/requirements-local.txtand append the lineflightsql-dbapi–for example:cat <<EOF >./docker/requirements-local.txt flightsql-dbapi EOFThe
./docker/requirements-local.txtfile is used to specify additional Python packages that Docker should include for Superset. For more information about Superset’s Docker configuration, see Getting Started with Superset using Docker. -
Use the
docker-compose pullcommand to fetch dependencies for the Docker containers.docker-compose -f docker-compose-non-dev.yml pullThe process might take several seconds to complete. After it completes, you’re ready to Start the Superset Docker containers.
Start the Superset Docker containers
To start the containers and run Superset, enter the docker-compose up command
and pass the -f flag with the setup file name:
docker-compose -f docker-compose-non-dev.yml up
This might take several seconds to complete.
If successful, the terminal contains output similar to the following:
superset_init | Init Step 4/4 [Complete] -- Loading examples
superset_init |
superset_init |
superset_init | ######################################################################
superset_init |
superset_init exited with code 0
superset_app | 127.0.0.1 - - [15/Jan/2025:15:14:11 +0000] "GET /health HTTP/1.1" 200 2 "-" "curl/7.74.0"
With Superset running, you’re ready to log in and set up a database connection.
Log in to Superset
-
In a browser, visit localhost:8088 to log in to the Superset user interface (UI). If you configured Superset to use a custom domain, navigate to your custom domain.
-
If this is your first time logging into Superset, use the following username and password:
- Username: admin
- Password: admin
-
Optional: Create a new admin user with a unique password.
- In the Superset UI, click Settings and select List Users.
- Click .
- Select the Admin role and provide the remaining credentials for the new user.
- Click Save.
- Delete the default admin users.
Create a database connection for InfluxDB
-
In the Superset UI, click Settings and select Database Connections.
-
Click + Database .
-
In the Connect a Database window, click on the Supported Databases drop-down menu and select Other.
-
Enter a Display Name (for example, InfluxDB 3 Core) for the database connection.
-
Enter your SQL Alchemy URI comprised of the following:
- Protocol:
datafusion+flightsql - Domain: InfluxDB 3 Core host (default is
localhost) - Port: InfluxDB 3 Core port (default is
8181)
Query parameters
-
?database: URL-encoded InfluxDB database name -
?token: InfluxDB authorization tokenWhile in beta, InfluxDB 3 Core does not require an authorization token.
# Syntax datafusion+flightsql://<domain>:<port>?database=<database-name>&token=<token> # Example datafusion+flightsql://localhost:8181?database=example-database&token=example-token - Protocol:
-
Click Test Connection to ensure the connection works.
-
Click Connect to save the database connection.
Query InfluxDB with Superset
With a connection to InfluxDB 3 Core established, you can begin to query and visualize data.
-
In the Superset UI, click SQL ▾ in the top navigation bar and select SQL Lab.
-
In the left pane:
- Under Database, select your InfluxDB 3 Core connection.
- Under Schema, select iox.
- Under See table schema, select the table to query.
The table schema appears in the left pane:
-
Use the query editor to write an SQL query that queries data in your InfluxDB database.
-
Click Run to execute the query.
Query results appear below the query editor.
Build visualizations with Superset
Use Superset to create visualizations and dashboards for InfluxDB queries. For a comprehensive walk-through of creating visualizations with Superset, see the Creating Charts and Dashboards in Superset documentation.
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB 3 Core and this documentation. To find support, use the following resources:
- InfluxDB Discord Server (Preferred)
- InfluxDB Community Slack
- InfluxData Community
- InfluxDB Subreddit
Customers with an annual or support contract can contact InfluxData Support.