docs: adjust chinese and english doc for superset
This commit is contained in:
parent
2595803e24
commit
4bd59e4e09
|
@ -11,7 +11,7 @@ Through the Python connector of TDengine, Superset can support TDengine data sou
|
||||||
|
|
||||||
## Install Apache Superset
|
## Install Apache Superset
|
||||||
|
|
||||||
Ensure that Apache Superset v2.1.0 or above is installed. If not, please visit [official website](https://superset.apache.org/)to install
|
Ensure that Apache Superset v2.1.0 or above is installed. If not, please visit [official website](https://superset.apache.org/) to install
|
||||||
|
|
||||||
## Install TDengine
|
## Install TDengine
|
||||||
|
|
||||||
|
@ -19,8 +19,8 @@ Both TDengine Enterprise Edition and Community Edition are supported, with versi
|
||||||
|
|
||||||
## Install TDengine Python Connector
|
## 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 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 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:
|
||||||
```bash
|
```bash
|
||||||
pip3 install taospy
|
pip3 install taospy
|
||||||
pip3 install taos-ws-py
|
pip3 install taos-ws-py
|
||||||
|
@ -28,14 +28,13 @@ pip3 install taos-ws-py
|
||||||
|
|
||||||
## Configure TDengine Connection In Superset
|
## Configure TDengine Connection In Superset
|
||||||
|
|
||||||
Step 1, enter the new database connection page
|
Step 1, enter the new database connection page, Superset -> Setting-> Database Connections -> +DATABASE
|
||||||
Superset -> Setting-> Database Connections -> +DATABASE
|
Step 2, select TDengine database connection, select the "TDengine" option from the drop-down list of "SUPPORTED DATABASES".
|
||||||
Step 2, select TDengine database connection
|
- If there is no TDengine option in the drop-down list, please confirm that the steps of installing Superset first and then installing the Python connector are correct.
|
||||||
Select the "TDengine" option from the drop-down list of Supported DATABASES. If there is no TDengine option in the drop-down list, please confirm that the steps of installing Superset first and then installing the Python connector are correct
|
Step 3, "DISPLAY NAME" give the connection a name in the PLAY NAME and fill it in freely
|
||||||
Step 3, give the connection a name in the PLAY NAME and fill it in freely
|
Step 4: The "SQLALCHEMY URL" field is a key connection information string, and it must be filled in correctly
|
||||||
Step 4: The SQLALCHEMY URL * field is a key connection information string, and it must be filled in correctly
|
|
||||||
```bash
|
```bash
|
||||||
Connection string format: taosws://user:password@host:port
|
taosws://user:password@host:port
|
||||||
```
|
```
|
||||||
| Parameter | Parameter Description |
|
| Parameter | Parameter Description |
|
||||||
|:---------- |:--------- |
|
|:---------- |:--------- |
|
||||||
|
@ -45,20 +44,20 @@ Step 4: The SQLALCHEMY URL * field is a key connection information string, and i
|
||||||
|port | The port that provides WebSocket services, default is 6041 |
|
|port | The port that provides WebSocket services, default is 6041 |
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
The TDengine database installed on this machine provides WebSocket service port 6041, using the default username and password, and the connection string is:
|
The TDengine database installed on this machine provides WebSocket service port 6041, using the default username and password, "SQLALCHEMY URL" is:
|
||||||
```bash
|
```bash
|
||||||
taosws://root:taosdata@localhost:6041
|
taosws://root:taosdata@localhost:6041
|
||||||
```
|
```
|
||||||
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, 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
|
||||||
|
|
||||||
|
|
||||||
## Start
|
## Start
|
||||||
|
|
||||||
There is no difference in the use of TDengine data source compared to other data sources. Here is a brief introduction to basic data queries:
|
There is no difference in the use of TDengine data source compared to other data sources. Here is a brief introduction to basic data queries:
|
||||||
1. Click the "+" button in the upper right corner of the Superset interface, select SQL query, and enter the query interface
|
1. Click the "+" button in the upper right corner of the Superset interface, select "SQL query", and enter the query interface
|
||||||
2. Select the TDengine data source that has been created earlier from the dropdown list in the upper left corner
|
2. Select the "TDengine" data source that has been created earlier from the dropdown list of "DATABASES" in the upper left corner
|
||||||
3. Select the name of the database to be operated on from the drop-down list of schema (system libraries are not displayed)
|
3. Select the name of the database to be operated on from the drop-down list of "SCHEMA" (system libraries are not displayed)
|
||||||
4. SEE TABLE Schematic: Select the name of the super table or regular table to be operated on (sub tables are not displayed)
|
4. "SEE TABLE SCHEMA" select the name of the super table or regular table to be operated on (sub tables are not displayed)
|
||||||
5. Subsequently, the schema information of the selected table will be displayed in the following area
|
5. Subsequently, the schema information of the selected table will be displayed in the following area
|
||||||
6. In the SQL editor area, any SQL statement that conforms to TDengine syntax can be entered for execution
|
6. In the SQL editor area, any SQL statement that conforms to TDengine syntax can be entered for execution
|
||||||
|
|
||||||
|
@ -66,10 +65,10 @@ There is no difference in the use of TDengine data source compared to other data
|
||||||
|
|
||||||
We chose two popular templates from the Superset Chart template to showcase their effects, using smart meter data as an example:
|
We chose two popular templates from the Superset Chart template to showcase their effects, using smart meter data as an example:
|
||||||
|
|
||||||
The first type is Aggregate, which displays the maximum voltage value collected per minute during the specified time period in Group 4
|
1. "Aggregate", which displays the maximum voltage value collected per minute during the specified time period in Group 4
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
The second type is RAW RECORDS, which displays the collected values of current and voltage during the specified time period in Group 4
|
2. "RAW RECORDS", which displays the collected values of current and voltage during the specified time period in Group 4
|
||||||
|
|
||||||

|

|
|
@ -26,11 +26,12 @@ pip3 install taos-ws-py
|
||||||
## Superset 中配置 TDengine 连接
|
## Superset 中配置 TDengine 连接
|
||||||
|
|
||||||
第1步,进入新建数据库连接页面 Superset -> Setting-> Database Connections -> +DATABASE
|
第1步,进入新建数据库连接页面 Superset -> Setting-> Database Connections -> +DATABASE
|
||||||
第2步,选择 TDengine 数据库连接。`SUPPORTED DATABASES` 下拉列表中选择 `TDengine` 项,若下拉列表中无 `TDengine` 项,请检查安装顺序,确保 `TDengine Python 连接器` 在 `Superset` 安装之后再安装。
|
第2步,选择 TDengine 数据库连接。"SUPPORTED DATABASES" 下拉列表中选择 "TDengine" 项。
|
||||||
第3步,`DISPLAY NAME` 中填写连接名称,任意填写即可。
|
- 若下拉列表中无 "TDengine" 项,请检查安装顺序,确保 `TDengine Python 连接器` 在 `Superset` 安装之后再安装。
|
||||||
第4步,`SQLALCHEMY URL` 项为关键连接信息串,务必填写正确。
|
第3步,"DISPLAY NAME" 中填写连接名称,任意填写即可。
|
||||||
|
第4步,"SQLALCHEMY URL" 项为关键连接信息串,务必填写正确。
|
||||||
```bash
|
```bash
|
||||||
连接串格式: taosws://用户名:密码@主机名:端口号
|
taosws://用户名:密码@主机名:端口号
|
||||||
```
|
```
|
||||||
| 参数名称 | 参数说明 |
|
| 参数名称 | 参数说明 |
|
||||||
|:------- |:-------------------------------- |
|
|:------- |:-------------------------------- |
|
||||||
|
@ -40,20 +41,20 @@ pip3 install taos-ws-py
|
||||||
| 端口号 | 提供 WebSocket 服务的端口,默认:6041 |
|
| 端口号 | 提供 WebSocket 服务的端口,默认:6041 |
|
||||||
|
|
||||||
示例:
|
示例:
|
||||||
本机安装 TDengine 数据库,WebSocket 服务端口 6041,使用默认用户名密码,连接串为:
|
本机安装 TDengine 数据库,WebSocket 服务端口 6041,使用默认用户名密码,"SQLALCHEMY URL" 应为:
|
||||||
```bash
|
```bash
|
||||||
taosws://root:taosdata@localhost:6041
|
taosws://root:taosdata@localhost:6041
|
||||||
```
|
```
|
||||||
第5步,配置好连接串,点击 `TEST CONNECTION` 测试连接是否成功,测试通过后点击 `CONNECT` 按钮,完成连接。
|
第5步,配置好连接串,点击 “TEST CONNECTION” 测试连接是否成功,测试通过后点击 “CONNECT” 按钮,完成连接。
|
||||||
|
|
||||||
|
|
||||||
## 开始使用
|
## 开始使用
|
||||||
|
|
||||||
TDengine 数据源与其它数据源使用上无差别,这里简单介绍下数据查询:
|
TDengine 数据源与其它数据源使用上无差别,这里简单介绍下数据查询:
|
||||||
1. Superset 界面点击右上角 “+” 号按钮,选择 `SQL query`, 进入查询界面
|
1. Superset 界面点击右上角 “+” 号按钮,选择 “SQL query”, 进入查询界面
|
||||||
2. 左上角 DATABASE 下拉列表中选择前面已创建好的 `TDengine` 数据源
|
2. 左上角 “DATABASE” 下拉列表中选择前面已创建好的 “TDengine” 数据源
|
||||||
3. SCHEMA 下拉列表,选择要操作的数据库名(系统库不显示)
|
3. “SCHEMA” 下拉列表,选择要操作的数据库名(系统库不显示)
|
||||||
4. SEE TABLE SCHEMA 选择要操作的超级表名或普通表名(子表不显示)
|
4. “SEE TABLE SCHEMA” 选择要操作的超级表名或普通表名(子表不显示)
|
||||||
5. 随后会在下方显示选定表的 SCHEMA 信息
|
5. 随后会在下方显示选定表的 SCHEMA 信息
|
||||||
6. 在 SQL 编辑器区域可输入符合 TDengine 语法的任意 SQL 语句执行
|
6. 在 SQL 编辑器区域可输入符合 TDengine 语法的任意 SQL 语句执行
|
||||||
|
|
||||||
|
@ -61,10 +62,10 @@ TDengine 数据源与其它数据源使用上无差别,这里简单介绍下
|
||||||
|
|
||||||
我们选择 Superset Chart 模板中较流行的两个模板做了效果展示,以智能电表数据为例:
|
我们选择 Superset Chart 模板中较流行的两个模板做了效果展示,以智能电表数据为例:
|
||||||
|
|
||||||
第一个为 Aggregate 类型,展示在第 4 组中指定时间段内每分钟采集电压值(voltage) 最大值
|
1. Aggregate 类型,展示在第 4 组中指定时间段内每分钟采集电压值(voltage)最大值
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
第二个为 RAW RECORDS 类型,展示在第 4 组中指定时间段内 current, voltage 的采集值
|
2. RAW RECORDS 类型,展示在第 4 组中指定时间段内 current, voltage 的采集值
|
||||||
|
|
||||||

|

|
||||||
|
|
Loading…
Reference in New Issue