You need to enable JavaScript to run this app.
导航

Superset

最近更新时间2023.08.21 14:35:50

首次发布时间2023.03.20 14:46:25

介绍

Apache Superset 是一个用于数据探索和数据可视化的开源软件应用程序,能够处理PB级的数据。

先决条件

基本要求:

推荐要求:

  • Python版本>=3.8

安装 ByteHouse Superset

  1. 获取 superset github 源码。
git clone https://github.com/apache/superset.git
  1. 进入 superset 目录。
cd superset
  1. 新建 ./docker/requirements-local.txt 文本文件。
touch ./docker/requirements-local.txt
  1. 在文本文件内写入 bytehouse-sqlalchemy 。
echo "bytehouse-sqlalchemy" >> ./docker/requirements-local.txt
  1. 构建并运行 Superset docker 容器。
docker-compose -f docker-compose-non-dev.yml pull
docker-compose -f docker-compose-non-dev.yml up

连接 ByteHouse

  1. Superset docker 构建运行后,您可以通过地址 http://localhost:8088/superset/welcome/ 访问 Superset UI 页面。

说明

默认账号和密码均为“admin”。

  1. 点击右上角的 [+] -> Data (数据) -> Connect database (连接数据库)。

图片

  1. 从 SUPPORTED DATABASES (支持的数据库)下拉列表中,选择 Other(其他)。

图片

  1. 在 DISPLAY NAME 字段,为外部数据源设置一个不重复的 Superset 数据库别名。
  2. 在 SQLALCHEMY URL字段填写 ByteHouse 连接字符串。
  3. 替换 Host:PortAPI key 字段,您可以在获取连接信息获取相关信息。
// API Key Format
bytehouse://{HOST}:{PORT}/?secure=true&user=bytehouse&password={API_KEY}&database={DATABASE}

// API Key Example
bytehouse://gateway.aws-ap-southeast-1.bytehouse.cloud:19000/?api_key=0x12dKWPk6KwN8&database=test