Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: SuperSet document for TDengine Cloud #29204

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 11 additions & 23 deletions docs/en/10-third-party/05-bi/11-superset.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,48 +9,36 @@ Apache Superset provides an intuitive user interface that makes creating, sharin

Through the Python connector of TDengine, Superset can support TDengine data sources and provide functions such as data presentation and analysis

## Install Apache Superset
## Prerequisites

Ensure that Apache Superset v2.1.0 or above is installed. If not, please visit [official website](https://superset.apache.org/) to install
Prepare the following environment:
- TDengine Cloud Server is running normally
- taosAdapter is running normally, refer to [taosAdapter](https://docs.tdengine.com/tdengine-reference/components/taosadapter/)
- Apache Superset version 2.1.0 or above is already installed, refre to [Apache Superset](https://superset.apache.org/)

## Install TDengine

Both TDengine Enterprise Edition and Community Edition are supported, with version requirements of 3.0 or higher

## Install TDengine Python Connector

The Python connector of TDengine comes with a connection driver that supports Superset in versions 2.1.18 and later, which will be automatically installed in the Superset directory and provide data source services.
The connection uses the WebSocket protocol, so it is necessary to install the `taos-ws-py` component of TDengine separately. The complete installation script is as follows:
The Python connector of TDengine comes with a connection driver that supports Superset in versions 2.1.21 and later, which will be automatically installed in the Superset directory and provide data source services.
The connection uses the WebSocket protocol, so it is necessary to install the `taos-ws-py`(version >= 0.3.8) component of TDengine separately. The complete installation script is as follows:
```bash
pip3 install taospy
pip3 install taos-ws-py
```

## Configure TDengine Connection In Superset
## Configure TDengine Cloud Connection In Superset

**Step 1**, enter the new database connection page, "Superset" → "Setting" → "Database Connections" → "+DATABASE"
**Step 2**, select TDengine database connection, select the "TDengine" option from the drop-down list of "SUPPORTED DATABASES".
:::tip
If there is no TDengine option in the drop-down list, please confirm that the steps of installing, `Superset` is first and `Python Connector` is second.
:::
**Step 3**, write a name of connection in "DISPLAY NAME"
**Step 4**, The "SQLALCHEMY URL" field is a key connection information string, and it must be filled in correctly
```bash
taosws://user:password@host:port
```
| Parameter | <center>Parameter Description</center> |
|:---------- |:--------------------------------------------------------- |
|user | Username for logging into TDengine database |
|password | Password for logging into TDengine database |
|host | Name of the host where the TDengine database is located |
|port | The port that provides WebSocket services, default is 6041 |

Example:
The TDengine database installed on this machine provides WebSocket service port 6041, using the default username and password, "SQLALCHEMY URL" is:
**Step 4**, the "SQLALCHEMY URL" field is a key connection information string, copy and paste the following string
```bash
taosws://root:taosdata@localhost:6041
taosws://gw.cloud.taosdata.com?token=0df909712bb345d6ba92253d3e6fb635d609c8ff
```
**Step 5**, configure the connection string, click "TEST CONNECTION" to test if the connection can be successful. After passing the test, click the "CONNECT" button to complete the connection
**Step 5**, click "TEST CONNECTION" to test if the connection can be successful. After passing the test, click the "CONNECT" button to complete the connection


## Start
Expand Down
35 changes: 11 additions & 24 deletions docs/zh/10-third-party/05-bi/11-superset.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,35 @@ title: 与 Superset 集成

通过 TDengine 的 Python 连接器, ‌Superset‌ 可支持 TDengine 数据源并提供数据展现、分析等功能

## 安装 Apache Superset
## 前置条件

确保已安装 Apache Superset v2.1.0 及以上版本, 如未安装,请到其 [官网](https://superset.apache.org/) 安装

## 安装 TDengine

TDengine 企业版及社区版均可支持,版本要求在 3.0 及以上
准备以下环境:
- TDengine 云服务实例已正常运行
- taosAdapter 在云服务实例中正常运行。详细参考 [taosAdapter 使用手册](https://docs.taosdata.com/reference/components/taosadapter/)
- Apache Superset v2.1.0 或以上版本已安装。安装 Apache Superset 请参考 [官方文档](https://superset.apache.org/)

## 安装 TDengine Python 连接器

TDengine Python 连接器从 `v2.1.18` 开始自带 Superset 连接驱动,安装程序会把连接驱动安装到 Superset 相应目录下并向 Superset 提供数据源服务
Superset 与 TDengine 之间使用 WebSocket 协议连接,所以需另安装支持 WebSocket 连接协议的组件 `taos-ws-py` , 全部安装脚本如下:
TDengine Python 连接器从 `v2.1.21` 开始自带 Superset 连接驱动,安装程序会把连接驱动安装到 Superset 相应目录下并向 Superset 提供数据源服务
Superset 与 TDengine 之间使用 WebSocket 协议连接,所以需另安装支持 WebSocket 连接协议的组件 `taos-ws-py`(版本要求 0.3.8 及以上) , 全部安装脚本如下:
```bash
pip3 install taospy
pip3 install taos-ws-py
```

## Superset 中配置 TDengine 连接
## Superset 中配置 TDengine 云服务连接

**第 1 步**,进入新建数据库连接页面 "Superset" → "Setting" → "Database Connections" → "+DATABASE"
**第 2 步**,选择 TDengine 数据库连接。"SUPPORTED DATABASES" 下拉列表中选择 "TDengine" 项。
:::tip
注意:若下拉列表中无 "TDengine" 项,请检查安装顺序,确保 `TDengine Python 连接器` 在 `Superset` 安装之后再安装。
:::
**第 3 步**,"DISPLAY NAME" 中填写连接名称,任意填写即可。
**第 4 步**,"SQLALCHEMY URL" 项为关键连接信息串,务必填写正确。
```bash
taosws://用户名:密码@主机名:端口号
```
| 参数名称 | <center>参数说明</center> |
|:------- |:-------------------------------- |
| 用户名 | 登录 TDengine 数据库用户名 |
| 密码 | 登录 TDengine 数据库密码 |
| 主机名 | TDengine 数据库所在主机名称 |
| 端口号 | 提供 WebSocket 服务的端口,默认:6041 |

示例:
本机安装 TDengine 数据库,WebSocket 服务端口 6041,使用默认用户名密码,"SQLALCHEMY URL" 应为:
**第 4 步**,"SQLALCHEMY URL" 项为关键连接信息串,复制以下内容粘贴即可。
```bash
taosws://root:taosdata@localhost:6041
taosws://gw.cloud.taosdata.com?token=0df909712bb345d6ba92253d3e6fb635d609c8ff
```
**第 5 步**,配置好连接串,点击 “TEST CONNECTION” 测试连接是否成功,测试通过后点击 “CONNECT” 按钮,完成连接。
**第 5 步**,点击 “TEST CONNECTION” 测试连接是否成功,测试通过后点击 “CONNECT” 按钮,完成连接。


## 开始使用
Expand Down