What is Superset

Apache Superset is an open-source software application for data exploration and data visualization able to handle data at petabyte scale.

Prerequisite

Basic requirements

Installing ByteHouse connector

  1. Reach out to ByteHouse support team for the links to install ByteHouse Connector
  2. Move these files to the superset/docker/ directory
  3. Add the driver & sqlalchemy to the local requirements
echo "./docker/bytehouse-driver-0.2.3.tar.gz" >> ./docker/requirements-local.txt
echo "./docker/bytehouse-sqlalchemy-0.2.4.tar.gz" >> ./docker/requirements-local.txt

Connecting to ByteHouse

  1. Build and run the superset docker container
docker-compose -f docker-compose-non-dev.yml pull
docker-compose -f docker-compose-non-dev.yml up
  1. After superset-docker-container has been built and running, you can use http://localhost:8088/superset/welcome/ to access the Superset UI

  2. On the top right, go to + dropdown -> Data -> Connect database

1280
  1. From SUPPORTED DATABASES dropdown, select Other
453
  1. Fill DISPLAY NAME with any name that you want to assign for database. Here database means Superset database alias which points to external datasource. Duplicate DISPLAY NAME is not allowed.

  2. Fill SQLACHEMY URI with bytehouse-connection-uri

  3. region, api_key, database

  4. region, account, user, password, database

// API Key Format
"bytehouse:///?region=$REGION&api_key=$API_KEY&database=$DATABASE"

// API Key Example
"bytehouse:///?region=AP-SOUTHEAST-1&api_key=0x12dKWPk6KwN8&database=test"


// Account, Username, Password Format
bytehouse:///?region=$REGION&account=$ACCOUNT&user=$USER&password=$PASSWORD&database=$DATABASE

// Account, Username, Password example
bytehouse:///?region=AP-SOUTHEAST-1&account=AWSAR17G&user=abc.mazu&password=ABCDE123&database=covid19