Connect Superset to Tinybird

Apache Superset can connect to Tinybird using the ClickHouse® database driver, taking advantage of Tinybird's ClickHouse® HTTP protocol compatibility. This enables you to create interactive dashboards, explore data, and build advanced visualizations with your Tinybird data.

The ClickHouse® connection to Tinybird is read-only. You can use it to visualize and analyze data from your Tinybird data sources, but you cannot modify data through this connection.

Prerequisites

  • Apache Superset instance (self-hosted or cloud)
  • ClickHouse® database driver installed (clickhouse-driver Python package)
  • A Tinybird workspace with data sources
  • A Tinybird Auth Token with read permissions for the workspace data sources

Add Tinybird as a database

  1. Access Admin Interface: In Superset, click Settings > Database Connections
  2. Add Database: Click the + Database button
  3. Select ClickHouse®: Choose ClickHouse® from the database type dropdown

Connection configuration

Using CLi

Host: clickhouse.<REGION>.tinybird.co  # Replace <REGION> with your region
Port: 443
Database Name: <WORKSPACE_NAME> 
Display Name: Tinybird prod # Choose a descriptive name

Authentication settings

Username: <WORKSPACE_NAME>  # not used for auth, helps you identify the connection
Password: <TOKEN>  # Your Tinybird Auth Token
SSL: yes
  1. Save the database: Click Finish to add the database to Superset
Superset ClickHouse® connection configuration
Superset ClickHouse® connection configuration

Alternative SQLAlchemy URI format

clickhousedb://<WORKSPACE_NAME>:<TOKEN>@clickhouse.<REGION>.tinybird.co:443/<WORKSPACE_NAME>

Test the connection

Once configured, test your connection by creating a simple query:

  1. Click + to create new SQL query
  2. Select your newly created database
  3. Write a simple query to test the connection

If the connection is working, you should see the result.

Learn more

Updated