Merge pull request #30129 from taosdata/merge/mainto3.0
merge: from main to 3.0 branch
10
Jenkinsfile2
|
@ -112,16 +112,6 @@ def build_pre_docs(){
|
|||
git fetch origin +refs/pull/${CHANGE_ID}/merge
|
||||
git checkout -qf FETCH_HEAD
|
||||
'''
|
||||
|
||||
sh '''
|
||||
cd ${DOC_WKC}/${tools_repo}
|
||||
git reset --hard
|
||||
git clean -f
|
||||
git fetch
|
||||
git remote prune origin
|
||||
git checkout ''' + env.CHANGE_TARGET + '''
|
||||
git pull >/dev/null
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,19 +27,19 @@ It should be noted that when configuring the ODBC data source for Tableau, the [
|
|||
|
||||
**Step 3**, Click the `DSN` radio button, then select the configured data source (MyTDengine), and click the `Connect` button. After the connection is successful, delete the content of the string attachment, and finally click the `Sign In` button.
|
||||
|
||||

|
||||

|
||||
|
||||
## Data Analysis
|
||||
|
||||
**Step 1**, In the workbook page, the connected data sources will be displayed. Clicking on the dropdown list of databases will display the databases that require data analysis. On this basis, click the search button in the table options to display all tables in the database. Then, drag the table to be analyzed to the right area to display the table structure.
|
||||
|
||||

|
||||

|
||||
|
||||
**Step 2**, Click the `Update Now` button below to display the data in the table.
|
||||
|
||||

|
||||

|
||||
|
||||
**Step 3**, Click on the "Worksheet" at the bottom of the window to pop up the data analysis window, which displays all the fields of the analysis table. Drag the fields to the rows and columns to display the chart.
|
||||
|
||||

|
||||

|
||||
|
||||
|
|
|
@ -21,22 +21,22 @@ Prepare the following environment:
|
|||
|
||||
**Step 2**, Start Excel in the Windows system environment, then select [Data] -> [Get Data] -> [From Other Sources] -> [From ODBC].
|
||||
|
||||

|
||||

|
||||
|
||||
**Step 3**, In the pop-up window, select the data source you need to connect to from the drop-down list of [Data source name (DSN)], and then click the [OK] button.
|
||||
|
||||

|
||||

|
||||
|
||||
**Step 4**, Enter the username and password for TDengine.
|
||||
|
||||

|
||||

|
||||
|
||||
**Step 5**, In the pop-up [Navigator] dialog box, select the database tables you want to load, and then click [Load] to complete the data loading.
|
||||
|
||||

|
||||

|
||||
|
||||
## Data Analysis
|
||||
|
||||
Select the imported data. On the [Insert] tab, choose the column chart, and then configure the data fields in the [PivotChart Fields] pane on the right.
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -0,0 +1,82 @@
|
|||
---
|
||||
sidebar_label: FineBI
|
||||
title: Integration With FineBI
|
||||
toc_max_heading_level: 4
|
||||
---
|
||||
|
||||
Fanruan is a technology company specializing in the field of business intelligence and data analytics. With its self-developed core products, FineBI and FineReport, the company has established a leading position in the industry. Fanruan's BI tools are widely adopted by enterprises across various sectors, empowering users to achieve data visualization analysis, report generation, and data-driven decision support.
|
||||
|
||||
By using the TDengine Java connector, FineBI can quickly access the data in TDengine. Users can directly connect to the TDengine database in FineBI, obtain time-series data for analysis, and create visual reports, and the entire process does not require any code writing.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- TDengine 3.3.4.0 and above version is installed and running normally (both Enterprise and Community versions are available).
|
||||
- taosAdapter is running normally, refer to [taosAdapter Reference](../../../tdengine-reference/components/taosadapter/).
|
||||
- Install FineBI (if not installed, please download and install [Download FineBI](https://intl.finebi.com/download)).
|
||||
- Download the fine_conf_entity plugin to support the addition of JDBC drivers, [Download link](https://market.fanruan.com/plugin/1052a471-0239-4cd8-b832-045d53182c5d).
|
||||
- Install the JDBC driver. Download the `TDengine JDBC connector` file `taos-jdbcdriver-3.4.0-dist.jar` or a higher version from `maven.org`.
|
||||
|
||||
## Configure Data Source
|
||||
|
||||
**Step 1**, In the `db.script` configuration file of the FineBI server, find the `SystemConfig.driverUpload` configuration item and change its value to true.
|
||||
|
||||
- Windows system: The path of the configuration file is webapps/webroot/WEB-INF/embed/finedb/db.script under the installation directory.
|
||||
- Linux/Mac system: The path of the configuration file is /usr/local/FineBI6.1/webapps/webroot/WEB-INF/embed/finedb/db.script.
|
||||
|
||||
**Step 2**, Start the FineBI service. Enter `http://ip:37799/webroot/decision` in the browser, where "ip" is the IP address of the FineBI server.
|
||||
|
||||
**Step 3**, After logging in to the FineBI Web page, click [System Management] -> [Plugin Management]. In the [Store App] on the right side, click [Install From Local] and select the downloaded `fine_conf_entity` plugin for installation.
|
||||
|
||||

|
||||
|
||||
**Step 4**, Click [System Management] -> [Data Connection] -> [Data Connection Management]. On the right-hand page, click the [Driver Management] button to open the configuration page. Then click the [New Driver] button, and in the pop-up window, enter a name (for example, `tdengine-websocket`) to configure the JDBC driver.
|
||||
|
||||

|
||||
|
||||
**Step 5**, On the driver configuration page, click the [Upload File] button. Select the downloaded TDengine Java Connector (e.g., `taos-jdbcdriver-3.4.0-dist.jar`) for uploading. After the upload is complete, select `com.taosdata.jdbc.ws.WebSocketDriver` from the drop-down list of [Driver], and then click [Save].
|
||||
|
||||

|
||||
|
||||
**Step 6**, On the "Data Connection Management" page, click the [New Data Connection] button. Subsequently, click "Others", and then on the right-side page, click "Other JDBC" to perform the connection configuration.
|
||||
|
||||

|
||||
|
||||
**Step 7**, On the configuration page, first enter the name of the data connection. Then, select "Custom" in the [Driver] option and choose the configured driver from the drop-down list (e.g., `com.taosdata.jdbc.ws.WebSocketDriver (tdengine-websocket)`). After that, configure the "Data Connection URL" (e.g., `jdbc:TAOS-WS://localhost:6041/power?user=root&password=taosdata&fineBIDialect=mysql`). Once the settings are completed, click [Test Connection] in the top-right corner to test the connection. After the verification is successful, click [Save] to finish the configuration.
|
||||
|
||||
:::tip
|
||||
`fineBIDialect=mysql` The meaning of this setting is to adopt the SQL dialect rules of the MySQL database. Simply put, it tells FineBI to parse and execute relevant queries and operations in the specific way that the MySQL database handles SQL statements.
|
||||
:::
|
||||
|
||||

|
||||
|
||||
## Data Analysis
|
||||
|
||||
### Data preparation
|
||||
|
||||
**Step 1**, Click [Public Data]. On the right - hand page, click [New Folder] to create a folder (e.g., TDengine). Then, click the [+] button on the right side of the folder to create a "Database Table" dataset or an "SQL Dataset".
|
||||
|
||||

|
||||
|
||||
**Step 2**, Click "Database Table" to open the database table selection page. In the "Data Connection" section on the left, select the previously created connection. Then, all the tables in the database of the current connection will be displayed on the right. Select the table you need to load (e.g., meters), and click [OK]. The data in the meters table will then be displayed.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
**Step 3**, Click "SQL Dataset" to open the configuration page for the SQL dataset. First, enter the table name (used for display on the FineBI page). Then, select the previously created connection from the drop-down list of "Data from Data Connection". After that, enter the SQL statement and click "Preview" to view the query results. Finally, click [OK] to successfully create the SQL dataset.
|
||||
|
||||

|
||||
|
||||
### Smart Meter Example
|
||||
|
||||
**Step 1**, Click [My Analysis]. On the right-hand page, click [New Folder] to create a folder (for example, `TDengine`). Then, click the [+] button on the right side of the folder to create an "Analysis Subject".
|
||||
|
||||

|
||||
|
||||
**Step 2**, On the analysis subject page, select the dataset (for example, `meters`) and then click the [OK] button to complete the association of the dataset.
|
||||
|
||||

|
||||
|
||||
**Step 3**, Click the [Component] tab at the bottom of the analysis subject page to open the chart configuration page. Drag the fields to the horizontal axis or the vertical axis, and then the chart will be displayed.
|
||||
|
||||

|
Before Width: | Height: | Size: 300 KiB |
After Width: | Height: | Size: 470 KiB |
Before Width: | Height: | Size: 761 KiB |
After Width: | Height: | Size: 324 KiB |
Before Width: | Height: | Size: 1.3 MiB |
After Width: | Height: | Size: 769 KiB |
Before Width: | Height: | Size: 659 KiB |
After Width: | Height: | Size: 286 KiB |
Before Width: | Height: | Size: 505 KiB |
After Width: | Height: | Size: 205 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 110 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 243 KiB |
After Width: | Height: | Size: 389 KiB |
Before Width: | Height: | Size: 255 KiB |
After Width: | Height: | Size: 543 KiB |
Before Width: | Height: | Size: 226 KiB |
After Width: | Height: | Size: 593 KiB |
Before Width: | Height: | Size: 107 KiB |
After Width: | Height: | Size: 189 KiB |
|
@ -26,18 +26,18 @@ Tableau 是一款知名的商业智能工具,它支持多种数据源,可方
|
|||
|
||||
**第 3 步**,点击 `DSN` 单选框,接着选择已配置好的数据源(MyTDengine),然后点击`连接`按钮。待连接成功后,删除字符串附加部分的内容,最后点击`登录`按钮即可。
|
||||
|
||||

|
||||

|
||||
|
||||
## 数据分析
|
||||
|
||||
**第 1 步**,在工作簿页面中,选择已连接的数据源。点击数据库的下拉列表,会显示需要进行数据分析的数据库。在此基础上,点击表选项中的查找按钮,即可将该数据库下的所有表显示出来。然后,拖动需要分析的表到右侧区域,即可显示出表结构。
|
||||
|
||||

|
||||

|
||||
|
||||
**第 2 步**,点击下方的"立即更新"按钮,即可将表中的数据展示出来。
|
||||
|
||||

|
||||

|
||||
|
||||
**第 3 步**,点击窗口下方的"工作表",弹出数据分析窗口, 并展示分析表的所有字段,将字段拖动到行列即可展示出图表。
|
||||
|
||||

|
||||

|
|
@ -19,22 +19,22 @@ title: 与 Excel 集成
|
|||
|
||||
**第 2 步**,在 Windows 系统环境下启动 Excel,之后选择【数据】->【获取数据】->【自其他源】->【从ODBC】。
|
||||
|
||||

|
||||

|
||||
|
||||
**第 3 步**,在弹出窗口的【数据源名称(DSN)】下拉列表中选择需要连接的数据源后,点击【确定】按钮。
|
||||
|
||||

|
||||

|
||||
|
||||
**第 4 步**,输入 TDengine 的用户名密码。
|
||||
|
||||

|
||||

|
||||
|
||||
**第 5 步**,在弹出的【导航器】对话框中,选择要加载的库表, 并点击【加载】完成数据加载。
|
||||
|
||||

|
||||

|
||||
|
||||
## 数据分析
|
||||
|
||||
选中导入的数据,在【插入】选项卡中选择柱状图,并且在右侧的【数据透视图】中配置数据字段。
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -0,0 +1,83 @@
|
|||
---
|
||||
sidebar_label: FineBI
|
||||
title: 与 FineBI 集成
|
||||
---
|
||||
|
||||
帆软是一家专注于商业智能与数据分析领域的科技企业,凭借自主研发的 FineBI 和 FineReport 两款核心产品在行业内占据重要地位。帆软的 BI 工具广泛应用于各类企业,帮助用户实现数据的可视化分析、报表生成和数据决策支持。
|
||||
|
||||
通过使用 `TDengine Java connector` 连接器,FineBI 可以快速访问 TDengine 的数据。用户可以在 FineBI 中直接连接 TDengine 数据库,获取时序数据进行分析并制作可视化报表,整个过程不需要任何代码编写过程。
|
||||
|
||||
## 前置条件
|
||||
|
||||
准备以下环境:
|
||||
|
||||
- TDengine 3.3.4.0 以上版本集群已部署并正常运行(企业及社区版均可)。
|
||||
- taosAdapter 能够正常运行,详细参考 [taosAdapter 参考手册](../../../reference/components/taosadapter)。
|
||||
- FineBI 安装(如未安装,请下载并安装 [FineBI 下载](https://www.finebi.com/product/download))。
|
||||
- 下载 `fine_conf_entity` 插件用于支持允许添加JDBC驱动, [下载地址](https://market.fanruan.com/plugin/1052a471-0239-4cd8-b832-045d53182c5d)。
|
||||
- 安装 JDBC 驱动。从 `maven.org` 下载 `TDengine JDBC` 连接器文件 `taos-jdbcdriver-3.4.0-dist.jar` 或以上版本。
|
||||
|
||||
## 配置数据源
|
||||
|
||||
**第 1 步**,在 FineBI 服务端 `db.script` 配置文件中,找到 `SystemConfig.driverUpload` 配置项并将其修改为 `true`。
|
||||
|
||||
- Windows 系统:配置文件路径是安装目录下 `webapps/webroot/WEB-INF/embed/finedb/db.script`。
|
||||
- Liunx/Mac 系统:配置文件路径是 `/usr/local/FineBI6.1/webapps/webroot/WEB-INF/embed/finedb/db.script`。
|
||||
|
||||
**第 2 步**,启动 FineBI 服务,在浏览器中输入 `http://ip:37799/webroot/decision`, 其中 ip 是 FineBI 服务端 ip 地址。
|
||||
|
||||
**第 3 步**, 打开 FineBI Web 页面登录后,点击【管理系统】->【插件管理】,在右侧的【应用商城】中点击【从本地安装】选择已下载的 `fine_conf_entity` 插件进行安装。
|
||||
|
||||

|
||||
|
||||
**第 4 步**,点击【管理系统】->【数据连接】->【数据连接管理】,在右侧页面中点击【驱动管理】按钮打开配置页面,点击【新建驱动】按钮并在弹出窗口中输入名称(比如 `tdengine-websocket`),进行 JDBC 驱动配置。
|
||||
|
||||

|
||||
|
||||
**第 5 步**,在驱动配置页面中点击【上传文件】按钮,选择已下载的 `TDengine Java Connector`(比如 `taos-jdbcdriver-3.4.0-dist.jar`)进行上传,上传完成后在【驱动】的下拉列表中选择 `com.taosdata.jdbc.ws.WebSocketDriver`,并点击【保存】。
|
||||
|
||||

|
||||
|
||||
**第 6 步**,在 “数据连接管理” 页面中,点击【新建数据连接】按钮,随后点击 “其他” ,在右侧页面中点击 “其他JDBC” 进行连接配置。
|
||||
|
||||

|
||||
|
||||
**第 7 步**,在配置页面,先输入数据连接名称,接着在【驱动】选项中选择 “自定义”,并从下拉列表里选取已配置的驱动(例如 `com.taosdata.jdbc.ws.WebSocketDriver (tdengine-websocket)`),之后配置 “数据连接 URL”(例如 `jdbc:TAOS-WS://localhost:6041/power?user=root&password=taosdata&fineBIDialect=mysql`)。设置完成后,点击右上角的【测试连接】进行连接测试,验证成功后点击【保存】即可完成配置。
|
||||
|
||||
:::tip
|
||||
`fineBIDialect=mysql` 设置的含义是采用 MySQL 数据库的 SQL 方言规则。简单来说,就是告诉 FineBI 按照 MySQL 数据库处理 SQL 语句的特定方式来解析和执行相关的查询与操作。
|
||||
:::
|
||||
|
||||

|
||||
|
||||
## 数据分析
|
||||
|
||||
### 数据准备
|
||||
|
||||
**第 1 步**,点击【公共数据】在右侧页面中点击【新建文件夹】即可创建一个文件夹(比如 `TDengine`), 接着在文件夹的右侧点击【+】按钮,可创建 “数据库表” 数据集或 “SQL数据集”。
|
||||
|
||||

|
||||
|
||||
**第 2 步**,点击 “数据库表”,打开数据库选表页面,在左侧 “数据连接” 中选择已创建的连接,则在右侧会显示当前连接的数据库中的所有表,选择需要加载的表(比如 `meters`),点击【确定】即可显示 `meters` 表中的数据。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
**第 3 步**,点击 “SQL数据集”,打开 SQL 数据集的配置页面,首先输入表名(用于在 FineBI 页面显示),接着在 “数据来自数据连接” 下拉列表中选择已创建的连接, 之后输入 SQL 语句并点击预览即可看到查询结果,最后点击【确定】SQL 数据集即可创建成功。
|
||||
|
||||

|
||||
|
||||
### 智能电表样例
|
||||
|
||||
**第 1 步**,点击【我的分析】在右侧页面中点击【新建文件夹】即可创建一个文件夹(比如 `TDengine),` 接着在文件夹的右侧点击【+】按钮,可创建 “分析主题”。
|
||||
|
||||

|
||||
|
||||
**第 2 步**,在分析主题页面选择数据集(比如 `meters`)后点击【确定】按钮,即可完成数据集关联。
|
||||
|
||||

|
||||
|
||||
**第 3 步**,点击分析主题页面下方的【组件】标签,打开图表配置页面, 拖动字段到横轴或纵轴即可展示出图表。
|
||||
|
||||

|
Before Width: | Height: | Size: 305 KiB |
After Width: | Height: | Size: 481 KiB |
Before Width: | Height: | Size: 753 KiB |
After Width: | Height: | Size: 338 KiB |
Before Width: | Height: | Size: 1.3 MiB |
After Width: | Height: | Size: 773 KiB |
Before Width: | Height: | Size: 643 KiB |
After Width: | Height: | Size: 288 KiB |
Before Width: | Height: | Size: 492 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 57 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 160 KiB |
After Width: | Height: | Size: 100 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 171 KiB |
After Width: | Height: | Size: 285 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 235 KiB |
After Width: | Height: | Size: 398 KiB |
Before Width: | Height: | Size: 238 KiB |
After Width: | Height: | Size: 514 KiB |
Before Width: | Height: | Size: 237 KiB |
After Width: | Height: | Size: 610 KiB |
Before Width: | Height: | Size: 102 KiB |
After Width: | Height: | Size: 181 KiB |
|
@ -57,7 +57,6 @@ void destroyStreamCountAggOperatorInfo(void* param) {
|
|||
}
|
||||
|
||||
destroyStreamBasicInfo(&pInfo->basic);
|
||||
|
||||
cleanupExprSupp(&pInfo->scalarSupp);
|
||||
clearGroupResInfo(&pInfo->groupResInfo);
|
||||
taosArrayDestroyP(pInfo->pUpdated, destroyFlusedPos);
|
||||
|
|
|
@ -56,7 +56,6 @@ void destroyStreamEventOperatorInfo(void* param) {
|
|||
}
|
||||
|
||||
destroyStreamBasicInfo(&pInfo->basic);
|
||||
|
||||
clearGroupResInfo(&pInfo->groupResInfo);
|
||||
taosArrayDestroyP(pInfo->pUpdated, destroyFlusedPos);
|
||||
pInfo->pUpdated = NULL;
|
||||
|
|
|
@ -2206,7 +2206,6 @@ void destroyStreamSessionAggOperatorInfo(void* param) {
|
|||
}
|
||||
|
||||
destroyStreamBasicInfo(&pInfo->basic);
|
||||
|
||||
cleanupExprSupp(&pInfo->scalarSupp);
|
||||
clearGroupResInfo(&pInfo->groupResInfo);
|
||||
taosArrayDestroyP(pInfo->pUpdated, destroyFlusedPos);
|
||||
|
@ -4445,7 +4444,6 @@ void destroyStreamStateOperatorInfo(void* param) {
|
|||
}
|
||||
|
||||
destroyStreamBasicInfo(&pInfo->basic);
|
||||
|
||||
clearGroupResInfo(&pInfo->groupResInfo);
|
||||
taosArrayDestroyP(pInfo->pUpdated, destroyFlusedPos);
|
||||
pInfo->pUpdated = NULL;
|
||||
|
|
|
@ -2118,12 +2118,15 @@ static int32_t pdcDealProject(SOptimizeContext* pCxt, SProjectLogicNode* pProjec
|
|||
if (NULL != pProject->node.pLimit || NULL != pProject->node.pSlimit) {
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
SLogicNode* pChild = (SLogicNode*)nodesListGetNode(pProject->node.pChildren, 0);
|
||||
if(pChild->pLimit != NULL) {
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
int32_t code = TSDB_CODE_SUCCESS;
|
||||
SNode* pProjCond = NULL;
|
||||
code = rewriteProjectCondForPushDown(pCxt, pProject, &pProjCond);
|
||||
if (TSDB_CODE_SUCCESS == code) {
|
||||
SLogicNode* pChild = (SLogicNode*)nodesListGetNode(pProject->node.pChildren, 0);
|
||||
code = pdcPushDownCondToChild(pCxt, pChild, &pProjCond);
|
||||
}
|
||||
|
||||
|
|
|
@ -360,7 +360,19 @@ class TDTestCase:
|
|||
tdSql.checkRows(0)
|
||||
tdLog.info("check db1 vgroups 1 limit 1 offset 100 successfully!")
|
||||
|
||||
|
||||
def ts6080(self):
|
||||
tdLog.printNoPrefix("======== test case 6080: ")
|
||||
tdSql.execute("create database db6080 vgroups 1;")
|
||||
tdSql.execute("use db6080;")
|
||||
tdSql.execute("create table db6080.st(ts timestamp, age int) tags(area int);")
|
||||
tdSql.execute("create table db6080.t1 using db6080.st tags(1);")
|
||||
|
||||
tdSql.Execute("insert into db6080.t1 values(1537146000000, 1);")
|
||||
tdSql.Execute("insert into db6080.t1 values(1537146000001, 2);")
|
||||
|
||||
tdSql.query("select ts, age from (select ts, age from db6080.t1 order by ts limit 1) where ts > 1537146000000;")
|
||||
tdSql.checkRows(0)
|
||||
|
||||
def run(self):
|
||||
# tdSql.prepare()
|
||||
self.prepareTestEnv()
|
||||
|
@ -368,6 +380,7 @@ class TDTestCase:
|
|||
|
||||
# one vgroup diff more than one vgroup check
|
||||
self.checkVGroups()
|
||||
|
||||
|
||||
|
||||
def stop(self):
|
||||
|
|