Superset ClickZetta adapter User Guide
Superset Introduction
Superset is an open-source BI data analysis and visualization platform by Airbnb, originally named Caravel and Panoramix. The main features of this tool include self-service analysis, custom dashboards, visualization (export) of analysis results, and user/role permission control. Superset also integrates an SQL editor, allowing users to perform SQL editing and querying. Initially, Superset was mainly used to support the visualization analysis of Druid, but later it evolved to support various relational databases and big data computing frameworks, such as MySQL, Oracle, PostgreSQL, Presto, SQLite, Redshift, Impala, SparkSQL, Greenplum, and MSSQL. Superset is based on the Python framework and integrates technologies such as Flask, D3, Pandas, and SqlAlchemy.
Superset ClickZetta Adapter
clickzetta-sqlalchemy
is a dialect adapter for SQLAlchemy that provides ClickZetta Lakehouse, making it easy for code or upper-layer applications written using the SQLAlchemy interface to connect to ClickZetta Lakehouse. Superset supports URL configuration data source links in the SQLAlchemy specification, so connecting to the ClickZetta database in Superset only requires configuring the corresponding URL.
Installation and Configuration
Using Docker Image
By using the Docker image, you can quickly experience the effect of Superset connecting to ClickZetta Lakehouse:
Open the browser and go to http://localhost:8088.
Local Installation
- Install
clickzetta-sqlalchemy
:clickzetta-sqlalchemy
needs to be installed in an environment with Python version 3.7 or above. Installation command (ensure the current environment does not need to use clickzetta-sqlalchemy and clickzetta-connector, uninstall them to avoid dependency conflicts):
- Install Superset: You can choose to install the same version of Superset as the image, or install a higher version of Superset.
- Initialize Superset:
Usage
Log in to Superset
- If you are using the image, the default username is
admin
and the password isclickzetta
. - If you have a local installation, please use the username and password you set during the installation step
superset fab create-admin
.
Connect to ClickZetta Database
- Click on Settings in the upper right corner and then Database Connections to navigate to the Superset database creation page.
- Click on Database in the upper right corner and select Other as the database type.
- Fill in the database name and the service URL of ClickZetta Lakehouse.
- Click the TESTING CONNECTION button to test if the connection is successful.
- If the test passes, click the CONNECT button below to complete the database connection.
ClickZetta URL Format
The format of the ClickZetta URL is as follows:
The meanings of each part are as follows:
- username: Username
- password: Password
- instance: Instance name
- service: Service domain name
- workspace: Workspace name
- vcluster: Resource name
The service supports specifying a port. If you do not need to specify a port, you can directly use the domain name. For example:
service supports both http and https protocols.
Using Superset for Visualization Analysis
After successfully connecting to the ClickZetta database, you can use Superset for data visualization analysis. Here are some usage examples:
- Create a chart: Click on Charts in the left menu bar and select New Chart. On the chart settings page, select the ClickZetta database you just connected to, then choose the appropriate table and fields to create the chart.
- Create a dashboard: Click on Dashboards in the left menu bar and select New Dashboard. On the dashboard settings page, you can add multiple charts and adjust their layout and style.
- Export and share: On the chart or dashboard page, you can click the export button in the upper right corner to export the analysis results as images,