diff --git a/src/UserGuide/Master/Table/Tools-System/Data-Export-Tool.md b/src/UserGuide/Master/Table/Tools-System/Data-Export-Tool.md
index 1c564820c..bba979010 100644
--- a/src/UserGuide/Master/Table/Tools-System/Data-Export-Tool.md
+++ b/src/UserGuide/Master/Table/Tools-System/Data-Export-Tool.md
@@ -1,7 +1,11 @@
# Data Export
## 1. Function Overview
-The data export tool `export-data.sh/bat` is located in the `tools` directory and can export query results from specified SQL statements into CSV, SQL, or TsFile (open-source time-series file format) formats. Its specific functionalities are as follows:
+
+IoTDB supports three methods for data export:
+
+* The data export tool: `export-data.sh/bat` is located in the tools directory, allows users to export query results from specified SQL statements into CSV, SQL, or TsFile (open-source time-series file format) formats. The specific functionalities are as follows:
+* ExportTsFile based on data subscription: `export_tsfile.sh/bat` is located in the tools directory and can export specified data files to TsFile format using data subscription.
@@ -19,14 +23,19 @@ The data export tool `export-data.sh/bat` is located in the `tools` directory an
File containing custom SQL statements. |
- TsFile |
+ TsFile |
Open-source time-series file format. |
+
+ export_tsfile.sh/bat |
+ Open-source time-series file format. |
+
-## 2. Detailed Features
+
+## 2. Data Export Tool
### 2.1 Common Parameters
| Short | Full Parameter | Description | Required | Default |
| ---------------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------- |-----------------------------------------------|
@@ -80,7 +89,7 @@ The data export tool `export-data.sh/bat` is located in the `tools` directory an
> export-data.sh -ft csv -sql_dialect table -t /path/export/dir -q "select * from table1"
Parse error: Missing required option: db
```
-## 2.3 SQL Format
+### 2.3 SQL Format
#### 2.3.1 Command
```Shell
# Unix/OS X
@@ -144,3 +153,57 @@ Parse error: Missing required option: db
> /tools/export-data.sh -ft tsfile -sql_dialect table -t /path/export/dir -start_time 0
Parse error: Missing required option: db
```
+
+## 3. ExportTsFile Based on Data Subscription
+
+The `export-tsfile.sh/bat` script supported in IoTDB V2.0.4.x can automatically create a data subscription with TsFile as the PayLoad, exporting specified data files into TsFile format.
+
+### 3.1 Command
+
+```Shell
+# Unix/OS X
+> tools/export-tsfile.sh [-sql_dialect ] [-h ] [-p ]
+ [-u ] [-pw ] [-db ] [-table ] [-start_time ] [-end_time ] [-t
+ ] [-tn ] [-help]
+
+# Windows
+> tools\windows>export-tsfile.bat [-sql_dialect ] [-h ] [-p ]
+ [-u ] [-pw ] [-db ] [-table ] [-start_time ] [-end_time ] [-t
+ ] [-tn ] [-help]
+```
+
+### 3.2 Parameters
+
+| Short | Full Parameter | Description | Required | Default |
+| -------------------- |-----------------|-------------------------------------------------------------------------------------|----------|----------------------------|
+| `-sql_dialect` | `--sql_dialect` | Choose between tree or table model for the source data. | No | `tree` |
+| `-h` | `--host` | IP address of the server node where the source data resides. | No | `127.0.0.1` |
+| `-p` | `--port` | Port number of the source data server. | No | `6667` |
+| `-u` | `--user` | username | No | `root` |
+| `-pw` | `--password` | password | No | `root` |
+| `-t` | `-target` | Directory path to save the exported files. | No | `$IOTDB_HOME/tools/target` |
+| `-db` | `-database` | Database name for table model exports. Supports regex (use `.*` for all databases). | No | `.*` |
+| `-table` | `-table` | Table name for table model exports. Supports regex (use `.*` for all databases). | No | `.*` |
+| `-start_time` | `--start_time` | Beginning timestamp of the data to export | No | - |
+| `-end_time` | `--end_time` | Ending timestamp of the data to export | No | - |
+| `-tn` | `--thread_num` | Number of parallel threads for export. | No | - |
+| `-help` | `--help` | Display usage instructions and parameter details. | | - |
+
+### 3.3 Examples
+
+```Bash
+> tools\windows>export-tsfile.bat -sql_dialect table -db database1
+
+Starting IoTDB Client Export Script
+
+sequence-database1-2-2864-1744786663074-1-0-0.tsfile
+sequence-database1-1-2864-1744786663116-1-0-0.tsfile
+sequence-database1-2-2865-1744786663085-1-0-0.tsfile
+sequence-database1-1-2661-1747641489473-1-0-0.tsfile
+sequence-database1-1-2865-1744786663118-1-0-0.tsfile
+sequence-database1-1-2882-1744855878285-3-0-0.tsfile
+sequence-database1-2-2882-1744855878319-3-0-0.tsfile
+sequence-database1-2-2661-1747639329126-1-1-0.tsfile
+Export TsFile Count: 8
+
+```
diff --git a/src/UserGuide/Master/Tree/Tools-System/Data-Export-Tool.md b/src/UserGuide/Master/Tree/Tools-System/Data-Export-Tool.md
index f349f4b8f..8840a4d72 100644
--- a/src/UserGuide/Master/Tree/Tools-System/Data-Export-Tool.md
+++ b/src/UserGuide/Master/Tree/Tools-System/Data-Export-Tool.md
@@ -1,7 +1,10 @@
# Data Export
## 1. Overview
-The data export tool, export-data.sh (Unix/OS X) or export-data.bat (Windows), located in the tools directory, allows users to export query results from specified SQL statements into CSV, SQL, or TsFile (open-source time-series file format) formats. The specific functionalities are as follows:
+IoTDB supports three methods for data export:
+
+* The data export tool: `export-data.sh/bat` is located in the tools directory, allows users to export query results from specified SQL statements into CSV, SQL, or TsFile (open-source time-series file format) formats. The specific functionalities are as follows:
+* ExportTsFile based on data subscription: `export_tsfile.sh/bat` is located in the tools directory and can export specified data files to TsFile format using data subscription.
@@ -19,14 +22,18 @@ The data export tool, export-data.sh (Unix/OS X) or export-data.bat (Windows), l
File containing custom SQL statements. |
- TsFile |
+ TsFile |
Open-source time-series file format. |
+
+ export_tsfile.sh/bat |
+ Open-source time-series file format. |
+
-## 2. Detailed Functionality
+## 2. Data Export Tool
### 2.1 Common Parameters
| Short | Full Parameter | Description | Required | Default |
| ---------------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------- |-----------------------------------------------|
@@ -75,7 +82,7 @@ The data export tool, export-data.sh (Unix/OS X) or export-data.bat (Windows), l
> tools/export-data.sh -ft csv -h 127.0.0.1 -p 6667 -u root -pw root
Parse error: Missing required option: t
```
-## 2.3 SQL Format
+### 2.3 SQL Format
#### 2.3.1 Command
```Shell
# Unix/OS X
@@ -138,3 +145,51 @@ Parse error: Missing required option: t
> tools/export-data.sh -ft tsfile -h 127.0.0.1 -p 6667 -u root -pw root
Parse error: Missing required option: t
```
+
+## 3. ExportTsFile Based on Data Subscription
+
+The `export-tsfile.sh/bat` script supported in IoTDB V2.0.4.x can automatically create a data subscription with TsFile as the PayLoad, exporting specified data files into TsFile format.
+
+### 3.1 Command
+
+```Shell
+# Unix/OS X
+> tools/export-tsfile.sh [-sql_dialect ] [-h ] [-p ]
+ [-u ] [-pw ] [-path ] [-start_time ] [-end_time ] [-t
+ ] [-tn ] [-help]
+
+# Windows
+> tools\windows>export-tsfile.bat [-sql_dialect ] [-h ] [-p ]
+ [-u ] [-pw ] [-path ] [-start_time ] [-end_time ] [-t
+ ] [-tn ] [-help]
+```
+
+### 3.2 Parameters
+
+| Short | Full Parameter | Description | Required | Default |
+| -------------------- |-----------------|------------------------------------------------------------------------|----------|----------------------------|
+| `-sql_dialect` | `--sql_dialect` | Choose between tree or table model for the source data. | No | `tree` |
+| `-h` | `--host` | IP address of the server node where the source data resides. | No | `127.0.0.1` |
+| `-p` | `--port` | Port number of the source data server. | No | `6667` |
+| `-u` | `--user` | username | No | `root` |
+| `-pw` | `--password` | password | No | `root` |
+| `-t` | `-target` | Directory path to save the exported files. | No | `$IOTDB_HOME/tools/target` |
+| `-path` | `--path` | Sequence path prefix for tree model exports. Windows: wrap paths in "" | No | `root.**` |
+| `-start_time` | `--start_time` | Beginning timestamp of the data to export | No | - |
+| `-end_time` | `--end_time` | Ending timestamp of the data to export | No | - |
+| `-tn` | `--thread_num` | Number of parallel threads for export. | No | - |
+| `-help` | `--help` | Display usage instructions and parameter details. | | - |
+
+### 3.3 Examples
+
+```Bash
+> tools\windows>export-tsfile.bat -sql_dialect tree -path "root.**"
+
+Starting IoTDB Client Export Script
+
+sequence-root.db-10-2887-1746520919075-1-1-0.tsfile
+sequence-root.db-9-2887-1746520891051-1-1-0.tsfile
+sequence-root.db-10-2889-1747361763179-1-0-0.tsfile
+Export TsFile Count: 3
+
+```
diff --git a/src/UserGuide/latest-Table/Tools-System/Data-Export-Tool.md b/src/UserGuide/latest-Table/Tools-System/Data-Export-Tool.md
index 1c564820c..bba979010 100644
--- a/src/UserGuide/latest-Table/Tools-System/Data-Export-Tool.md
+++ b/src/UserGuide/latest-Table/Tools-System/Data-Export-Tool.md
@@ -1,7 +1,11 @@
# Data Export
## 1. Function Overview
-The data export tool `export-data.sh/bat` is located in the `tools` directory and can export query results from specified SQL statements into CSV, SQL, or TsFile (open-source time-series file format) formats. Its specific functionalities are as follows:
+
+IoTDB supports three methods for data export:
+
+* The data export tool: `export-data.sh/bat` is located in the tools directory, allows users to export query results from specified SQL statements into CSV, SQL, or TsFile (open-source time-series file format) formats. The specific functionalities are as follows:
+* ExportTsFile based on data subscription: `export_tsfile.sh/bat` is located in the tools directory and can export specified data files to TsFile format using data subscription.
@@ -19,14 +23,19 @@ The data export tool `export-data.sh/bat` is located in the `tools` directory an
File containing custom SQL statements. |
- TsFile |
+ TsFile |
Open-source time-series file format. |
+
+ export_tsfile.sh/bat |
+ Open-source time-series file format. |
+
-## 2. Detailed Features
+
+## 2. Data Export Tool
### 2.1 Common Parameters
| Short | Full Parameter | Description | Required | Default |
| ---------------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------- |-----------------------------------------------|
@@ -80,7 +89,7 @@ The data export tool `export-data.sh/bat` is located in the `tools` directory an
> export-data.sh -ft csv -sql_dialect table -t /path/export/dir -q "select * from table1"
Parse error: Missing required option: db
```
-## 2.3 SQL Format
+### 2.3 SQL Format
#### 2.3.1 Command
```Shell
# Unix/OS X
@@ -144,3 +153,57 @@ Parse error: Missing required option: db
> /tools/export-data.sh -ft tsfile -sql_dialect table -t /path/export/dir -start_time 0
Parse error: Missing required option: db
```
+
+## 3. ExportTsFile Based on Data Subscription
+
+The `export-tsfile.sh/bat` script supported in IoTDB V2.0.4.x can automatically create a data subscription with TsFile as the PayLoad, exporting specified data files into TsFile format.
+
+### 3.1 Command
+
+```Shell
+# Unix/OS X
+> tools/export-tsfile.sh [-sql_dialect ] [-h ] [-p ]
+ [-u ] [-pw ] [-db ] [-table ] [-start_time ] [-end_time ] [-t
+ ] [-tn ] [-help]
+
+# Windows
+> tools\windows>export-tsfile.bat [-sql_dialect ] [-h ] [-p ]
+ [-u ] [-pw ] [-db ] [-table ] [-start_time ] [-end_time ] [-t
+ ] [-tn ] [-help]
+```
+
+### 3.2 Parameters
+
+| Short | Full Parameter | Description | Required | Default |
+| -------------------- |-----------------|-------------------------------------------------------------------------------------|----------|----------------------------|
+| `-sql_dialect` | `--sql_dialect` | Choose between tree or table model for the source data. | No | `tree` |
+| `-h` | `--host` | IP address of the server node where the source data resides. | No | `127.0.0.1` |
+| `-p` | `--port` | Port number of the source data server. | No | `6667` |
+| `-u` | `--user` | username | No | `root` |
+| `-pw` | `--password` | password | No | `root` |
+| `-t` | `-target` | Directory path to save the exported files. | No | `$IOTDB_HOME/tools/target` |
+| `-db` | `-database` | Database name for table model exports. Supports regex (use `.*` for all databases). | No | `.*` |
+| `-table` | `-table` | Table name for table model exports. Supports regex (use `.*` for all databases). | No | `.*` |
+| `-start_time` | `--start_time` | Beginning timestamp of the data to export | No | - |
+| `-end_time` | `--end_time` | Ending timestamp of the data to export | No | - |
+| `-tn` | `--thread_num` | Number of parallel threads for export. | No | - |
+| `-help` | `--help` | Display usage instructions and parameter details. | | - |
+
+### 3.3 Examples
+
+```Bash
+> tools\windows>export-tsfile.bat -sql_dialect table -db database1
+
+Starting IoTDB Client Export Script
+
+sequence-database1-2-2864-1744786663074-1-0-0.tsfile
+sequence-database1-1-2864-1744786663116-1-0-0.tsfile
+sequence-database1-2-2865-1744786663085-1-0-0.tsfile
+sequence-database1-1-2661-1747641489473-1-0-0.tsfile
+sequence-database1-1-2865-1744786663118-1-0-0.tsfile
+sequence-database1-1-2882-1744855878285-3-0-0.tsfile
+sequence-database1-2-2882-1744855878319-3-0-0.tsfile
+sequence-database1-2-2661-1747639329126-1-1-0.tsfile
+Export TsFile Count: 8
+
+```
diff --git a/src/UserGuide/latest/Tools-System/Data-Export-Tool.md b/src/UserGuide/latest/Tools-System/Data-Export-Tool.md
index f349f4b8f..8840a4d72 100644
--- a/src/UserGuide/latest/Tools-System/Data-Export-Tool.md
+++ b/src/UserGuide/latest/Tools-System/Data-Export-Tool.md
@@ -1,7 +1,10 @@
# Data Export
## 1. Overview
-The data export tool, export-data.sh (Unix/OS X) or export-data.bat (Windows), located in the tools directory, allows users to export query results from specified SQL statements into CSV, SQL, or TsFile (open-source time-series file format) formats. The specific functionalities are as follows:
+IoTDB supports three methods for data export:
+
+* The data export tool: `export-data.sh/bat` is located in the tools directory, allows users to export query results from specified SQL statements into CSV, SQL, or TsFile (open-source time-series file format) formats. The specific functionalities are as follows:
+* ExportTsFile based on data subscription: `export_tsfile.sh/bat` is located in the tools directory and can export specified data files to TsFile format using data subscription.
@@ -19,14 +22,18 @@ The data export tool, export-data.sh (Unix/OS X) or export-data.bat (Windows), l
File containing custom SQL statements. |
- TsFile |
+ TsFile |
Open-source time-series file format. |
+
+ export_tsfile.sh/bat |
+ Open-source time-series file format. |
+
-## 2. Detailed Functionality
+## 2. Data Export Tool
### 2.1 Common Parameters
| Short | Full Parameter | Description | Required | Default |
| ---------------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------- |-----------------------------------------------|
@@ -75,7 +82,7 @@ The data export tool, export-data.sh (Unix/OS X) or export-data.bat (Windows), l
> tools/export-data.sh -ft csv -h 127.0.0.1 -p 6667 -u root -pw root
Parse error: Missing required option: t
```
-## 2.3 SQL Format
+### 2.3 SQL Format
#### 2.3.1 Command
```Shell
# Unix/OS X
@@ -138,3 +145,51 @@ Parse error: Missing required option: t
> tools/export-data.sh -ft tsfile -h 127.0.0.1 -p 6667 -u root -pw root
Parse error: Missing required option: t
```
+
+## 3. ExportTsFile Based on Data Subscription
+
+The `export-tsfile.sh/bat` script supported in IoTDB V2.0.4.x can automatically create a data subscription with TsFile as the PayLoad, exporting specified data files into TsFile format.
+
+### 3.1 Command
+
+```Shell
+# Unix/OS X
+> tools/export-tsfile.sh [-sql_dialect ] [-h ] [-p ]
+ [-u ] [-pw ] [-path ] [-start_time ] [-end_time ] [-t
+ ] [-tn ] [-help]
+
+# Windows
+> tools\windows>export-tsfile.bat [-sql_dialect ] [-h ] [-p ]
+ [-u ] [-pw ] [-path ] [-start_time ] [-end_time ] [-t
+ ] [-tn ] [-help]
+```
+
+### 3.2 Parameters
+
+| Short | Full Parameter | Description | Required | Default |
+| -------------------- |-----------------|------------------------------------------------------------------------|----------|----------------------------|
+| `-sql_dialect` | `--sql_dialect` | Choose between tree or table model for the source data. | No | `tree` |
+| `-h` | `--host` | IP address of the server node where the source data resides. | No | `127.0.0.1` |
+| `-p` | `--port` | Port number of the source data server. | No | `6667` |
+| `-u` | `--user` | username | No | `root` |
+| `-pw` | `--password` | password | No | `root` |
+| `-t` | `-target` | Directory path to save the exported files. | No | `$IOTDB_HOME/tools/target` |
+| `-path` | `--path` | Sequence path prefix for tree model exports. Windows: wrap paths in "" | No | `root.**` |
+| `-start_time` | `--start_time` | Beginning timestamp of the data to export | No | - |
+| `-end_time` | `--end_time` | Ending timestamp of the data to export | No | - |
+| `-tn` | `--thread_num` | Number of parallel threads for export. | No | - |
+| `-help` | `--help` | Display usage instructions and parameter details. | | - |
+
+### 3.3 Examples
+
+```Bash
+> tools\windows>export-tsfile.bat -sql_dialect tree -path "root.**"
+
+Starting IoTDB Client Export Script
+
+sequence-root.db-10-2887-1746520919075-1-1-0.tsfile
+sequence-root.db-9-2887-1746520891051-1-1-0.tsfile
+sequence-root.db-10-2889-1747361763179-1-0-0.tsfile
+Export TsFile Count: 3
+
+```
diff --git a/src/zh/UserGuide/Master/Table/Tools-System/Data-Export-Tool.md b/src/zh/UserGuide/Master/Table/Tools-System/Data-Export-Tool.md
index 185020c60..fd2991603 100644
--- a/src/zh/UserGuide/Master/Table/Tools-System/Data-Export-Tool.md
+++ b/src/zh/UserGuide/Master/Table/Tools-System/Data-Export-Tool.md
@@ -2,7 +2,10 @@
## 1. 功能概述
-数据导出工具 `export-data.sh/bat` 位于 `tools` 目录下,能够将指定 SQL 的查询结果导出为 CSV、SQL 及 TsFile(开源时间序列文件格式)格式。具体功能如下:
+IoTDB 支持两种方式进行数据导出:
+
+* 数据导出工具: `export-data.sh/bat` 位于 `tools` 目录下,能够将指定 SQL 的查询结果导出为 CSV、SQL 及 TsFile(开源时间序列文件格式)格式。
+* 基于数据订阅的 ExportTsFile:`export_tsfile.sh/bat` 位于 `tools` 目录下,能够使用数据订阅将指定的数据文件导出为 TsFile 格式。
@@ -20,14 +23,18 @@
包含自定义 SQL 语句的文件 |
- TsFile |
- 开源时序数据文件格式 |
-
+ TsFile |
+ 开源时序数据文件格式 |
+
+
+ export_tsfile.sh/bat |
+ 开源时序数据文件格式 |
+
-## 2. 功能详解
+## 2. 数据导出工具
### 2.1 公共参数
@@ -154,3 +161,58 @@ Parse error: Missing required option: db
> /tools/export-data.sh -ft tsfile -sql_dialect table -t /path/export/dir -start_time 0
Parse error: Missing required option: db
```
+
+## 3. 基于数据订阅的 ExportTsFile
+
+IoTDB V2.0.4.x 支持的`export-tsfile.sh/bat` 脚本,能够自动创建以 TsFile 为 PayLoad 的数据订阅,将指定的数据文件导出为 TsFile 格式。
+
+### 3.1 运行命令
+
+```Shell
+# Unix/OS X
+> tools/export-tsfile.sh [-sql_dialect ] [-h ] [-p ]
+ [-u ] [-pw ] [-db ] [-table ] [-start_time ] [-end_time ] [-t
+ ] [-tn ] [-help]
+
+# Windows
+> tools\windows>export-tsfile.bat [-sql_dialect ] [-h ] [-p ]
+ [-u ] [-pw ] [-db ] [-table ] [-start_time ] [-end_time ] [-t
+ ] [-tn ] [-help]
+```
+
+### 3.2 脚本参数
+
+| 参数缩写 | 参数全称 | 参数含义 | 是否为必填项 | 默认值 |
+| -------------------- |-----------------|----------------------------------------------| -------------- | -------------------------------- |
+| `-sql_dialect` | `--sql_dialect` | 选择 server 是树模型还是表模型,当前支持 tree 和 table 类型 | 否 | `tree` |
+| `-h` | `--host` | 源数据所在服务节点 ip | 否 | `127.0.0.1` |
+| `-p` | `--port` | 源数据所在服务节点 port | 否 | `6667` |
+| `-u` | `--user` | 用户名 | 否 | `root` |
+| `-pw` | `--password` | 密码 | 否 | `root` |
+| `-t` | `-target` | 文件输出目录 | 否 | `$IOTDB_HOME/tools/target` |
+| `-db` | `-database` | 表模型导出的 database(表模型参数,支持正则,全量写.\*) | 否| `.*`|
+| `-table` | `-table` | 表模型导出的 table(表模型参数,支持正则,全量写.\*) | 否 | `.*` |
+| `-start_time` | `--start_time` | 导出数据的开始时间 | 否 | - |
+| `-end_time` | `--end_time` | 导出数据的结束时间 | 否 | - |
+| `-tn` | `--thread_num` | 导出的并行数 | 否 | - |
+| `-help` | `--help` | 查看帮助 |||
+
+### 3.3 运行示例
+
+```Bash
+> tools\windows>export-tsfile.bat -sql_dialect table -db database1
+
+Starting IoTDB Client Export Script
+
+sequence-database1-2-2864-1744786663074-1-0-0.tsfile
+sequence-database1-1-2864-1744786663116-1-0-0.tsfile
+sequence-database1-2-2865-1744786663085-1-0-0.tsfile
+sequence-database1-1-2661-1747641489473-1-0-0.tsfile
+sequence-database1-1-2865-1744786663118-1-0-0.tsfile
+sequence-database1-1-2882-1744855878285-3-0-0.tsfile
+sequence-database1-2-2882-1744855878319-3-0-0.tsfile
+sequence-database1-2-2661-1747639329126-1-1-0.tsfile
+Export TsFile Count: 8
+
+```
+
diff --git a/src/zh/UserGuide/Master/Tree/Tools-System/Data-Export-Tool.md b/src/zh/UserGuide/Master/Tree/Tools-System/Data-Export-Tool.md
index d28536275..7dc5aa083 100644
--- a/src/zh/UserGuide/Master/Tree/Tools-System/Data-Export-Tool.md
+++ b/src/zh/UserGuide/Master/Tree/Tools-System/Data-Export-Tool.md
@@ -2,7 +2,10 @@
## 1. 功能概述
-数据导出工具 export-data.sh/bat 位于 tools 目录下,能够将指定 SQL 的查询结果导出为 CSV、SQL 及 TsFile(开源时间序列文件格式)格式。具体功能如下:
+IoTDB 支持两种方式进行数据导出:
+
+* 数据导出工具: `export-data.sh/bat` 位于 `tools` 目录下,能够将指定 SQL 的查询结果导出为 CSV、SQL 及 TsFile(开源时间序列文件格式)格式。
+* 基于数据订阅的 ExportTsFile:`export_tsfile.sh/bat` 位于 `tools` 目录下,能够使用数据订阅将指定的数据文件导出为 TsFile 格式。
@@ -20,14 +23,18 @@
包含自定义 SQL 语句的文件 |
- TsFile |
- 开源时序数据文件格式 |
-
+ TsFile |
+ 开源时序数据文件格式 |
+
+
+ export_tsfile.sh/bat |
+ 开源时序数据文件格式 |
+
-## 2. 功能详解
+## 2. 数据导出工具
### 2.1 公共参数
@@ -148,3 +155,52 @@ Parse error: Missing required option: t
> tools/export-data.sh -ft tsfile -h 127.0.0.1 -p 6667 -u root -pw root
Parse error: Missing required option: t
```
+
+## 3. 基于数据订阅的 ExportTsFile
+
+IoTDB V2.0.4.x 支持的`export-tsfile.sh/bat` 脚本,能够自动创建以 TsFile 为 PayLoad 的数据订阅,将指定的数据文件导出为 TsFile 格式。
+
+### 3.1 运行命令
+
+```Shell
+# Unix/OS X
+> tools/export-tsfile.sh [-sql_dialect ] [-h ] [-p ]
+ [-u ] [-pw ] [-path ] [-start_time ] [-end_time ] [-t
+ ] [-tn ] [-help]
+
+# Windows
+> tools\windows>export-tsfile.bat [-sql_dialect ] [-h ] [-p ]
+ [-u ] [-pw ] [-path ] [-start_time ] [-end_time ] [-t
+ ] [-tn ] [-help]
+```
+
+### 3.2 脚本参数
+
+| 参数缩写 | 参数全称 | 参数含义 | 是否为必填项 | 默认值 |
+| -------------------- |-----------------|----------------------------------------------| -------------- | -------------------------------- |
+| `-sql_dialect` | `--sql_dialect` | 选择 server 是树模型还是表模型,当前支持 tree 和 table 类型 | 否 | `tree` |
+| `-h` | `--host` | 源数据所在服务节点 ip | 否 | `127.0.0.1` |
+| `-p` | `--port` | 源数据所在服务节点 port | 否 | `6667` |
+| `-u` | `--user` | 用户名 | 否 | `root` |
+| `-pw` | `--password` | 密码 | 否 | `root` |
+| `-t` | `-target` | 文件输出目录 | 否 | `$IOTDB_HOME/tools/target` |
+| `-path` | `--path` | 树模型导出的序列路径(树模型参数,默认生效),windows 中请讲参数值使用""包裹 | 否 | `root.**` |
+| `-start_time` | `--start_time` | 导出数据的开始时间 | 否 | - |
+| `-end_time` | `--end_time` | 导出数据的结束时间 | 否 | - |
+| `-tn` | `--thread_num` | 导出的并行数 | 否 | - |
+| `-help` | `--help` | 查看帮助 |||
+
+### 3.3 运行示例
+
+```Bash
+> tools\windows>export-tsfile.bat -sql_dialect tree -path "root.**"
+
+Starting IoTDB Client Export Script
+
+sequence-root.db-10-2887-1746520919075-1-1-0.tsfile
+sequence-root.db-9-2887-1746520891051-1-1-0.tsfile
+sequence-root.db-10-2889-1747361763179-1-0-0.tsfile
+Export TsFile Count: 3
+
+```
+
diff --git a/src/zh/UserGuide/latest-Table/Tools-System/Data-Export-Tool.md b/src/zh/UserGuide/latest-Table/Tools-System/Data-Export-Tool.md
index 185020c60..fd2991603 100644
--- a/src/zh/UserGuide/latest-Table/Tools-System/Data-Export-Tool.md
+++ b/src/zh/UserGuide/latest-Table/Tools-System/Data-Export-Tool.md
@@ -2,7 +2,10 @@
## 1. 功能概述
-数据导出工具 `export-data.sh/bat` 位于 `tools` 目录下,能够将指定 SQL 的查询结果导出为 CSV、SQL 及 TsFile(开源时间序列文件格式)格式。具体功能如下:
+IoTDB 支持两种方式进行数据导出:
+
+* 数据导出工具: `export-data.sh/bat` 位于 `tools` 目录下,能够将指定 SQL 的查询结果导出为 CSV、SQL 及 TsFile(开源时间序列文件格式)格式。
+* 基于数据订阅的 ExportTsFile:`export_tsfile.sh/bat` 位于 `tools` 目录下,能够使用数据订阅将指定的数据文件导出为 TsFile 格式。
@@ -20,14 +23,18 @@
包含自定义 SQL 语句的文件 |
- TsFile |
- 开源时序数据文件格式 |
-
+ TsFile |
+ 开源时序数据文件格式 |
+
+
+ export_tsfile.sh/bat |
+ 开源时序数据文件格式 |
+
-## 2. 功能详解
+## 2. 数据导出工具
### 2.1 公共参数
@@ -154,3 +161,58 @@ Parse error: Missing required option: db
> /tools/export-data.sh -ft tsfile -sql_dialect table -t /path/export/dir -start_time 0
Parse error: Missing required option: db
```
+
+## 3. 基于数据订阅的 ExportTsFile
+
+IoTDB V2.0.4.x 支持的`export-tsfile.sh/bat` 脚本,能够自动创建以 TsFile 为 PayLoad 的数据订阅,将指定的数据文件导出为 TsFile 格式。
+
+### 3.1 运行命令
+
+```Shell
+# Unix/OS X
+> tools/export-tsfile.sh [-sql_dialect ] [-h ] [-p ]
+ [-u ] [-pw ] [-db ] [-table ] [-start_time ] [-end_time ] [-t
+ ] [-tn ] [-help]
+
+# Windows
+> tools\windows>export-tsfile.bat [-sql_dialect ] [-h ] [-p ]
+ [-u ] [-pw ] [-db ] [-table ] [-start_time ] [-end_time ] [-t
+ ] [-tn ] [-help]
+```
+
+### 3.2 脚本参数
+
+| 参数缩写 | 参数全称 | 参数含义 | 是否为必填项 | 默认值 |
+| -------------------- |-----------------|----------------------------------------------| -------------- | -------------------------------- |
+| `-sql_dialect` | `--sql_dialect` | 选择 server 是树模型还是表模型,当前支持 tree 和 table 类型 | 否 | `tree` |
+| `-h` | `--host` | 源数据所在服务节点 ip | 否 | `127.0.0.1` |
+| `-p` | `--port` | 源数据所在服务节点 port | 否 | `6667` |
+| `-u` | `--user` | 用户名 | 否 | `root` |
+| `-pw` | `--password` | 密码 | 否 | `root` |
+| `-t` | `-target` | 文件输出目录 | 否 | `$IOTDB_HOME/tools/target` |
+| `-db` | `-database` | 表模型导出的 database(表模型参数,支持正则,全量写.\*) | 否| `.*`|
+| `-table` | `-table` | 表模型导出的 table(表模型参数,支持正则,全量写.\*) | 否 | `.*` |
+| `-start_time` | `--start_time` | 导出数据的开始时间 | 否 | - |
+| `-end_time` | `--end_time` | 导出数据的结束时间 | 否 | - |
+| `-tn` | `--thread_num` | 导出的并行数 | 否 | - |
+| `-help` | `--help` | 查看帮助 |||
+
+### 3.3 运行示例
+
+```Bash
+> tools\windows>export-tsfile.bat -sql_dialect table -db database1
+
+Starting IoTDB Client Export Script
+
+sequence-database1-2-2864-1744786663074-1-0-0.tsfile
+sequence-database1-1-2864-1744786663116-1-0-0.tsfile
+sequence-database1-2-2865-1744786663085-1-0-0.tsfile
+sequence-database1-1-2661-1747641489473-1-0-0.tsfile
+sequence-database1-1-2865-1744786663118-1-0-0.tsfile
+sequence-database1-1-2882-1744855878285-3-0-0.tsfile
+sequence-database1-2-2882-1744855878319-3-0-0.tsfile
+sequence-database1-2-2661-1747639329126-1-1-0.tsfile
+Export TsFile Count: 8
+
+```
+
diff --git a/src/zh/UserGuide/latest/Tools-System/Data-Export-Tool.md b/src/zh/UserGuide/latest/Tools-System/Data-Export-Tool.md
index d28536275..7dc5aa083 100644
--- a/src/zh/UserGuide/latest/Tools-System/Data-Export-Tool.md
+++ b/src/zh/UserGuide/latest/Tools-System/Data-Export-Tool.md
@@ -2,7 +2,10 @@
## 1. 功能概述
-数据导出工具 export-data.sh/bat 位于 tools 目录下,能够将指定 SQL 的查询结果导出为 CSV、SQL 及 TsFile(开源时间序列文件格式)格式。具体功能如下:
+IoTDB 支持两种方式进行数据导出:
+
+* 数据导出工具: `export-data.sh/bat` 位于 `tools` 目录下,能够将指定 SQL 的查询结果导出为 CSV、SQL 及 TsFile(开源时间序列文件格式)格式。
+* 基于数据订阅的 ExportTsFile:`export_tsfile.sh/bat` 位于 `tools` 目录下,能够使用数据订阅将指定的数据文件导出为 TsFile 格式。
@@ -20,14 +23,18 @@
包含自定义 SQL 语句的文件 |
- TsFile |
- 开源时序数据文件格式 |
-
+ TsFile |
+ 开源时序数据文件格式 |
+
+
+ export_tsfile.sh/bat |
+ 开源时序数据文件格式 |
+
-## 2. 功能详解
+## 2. 数据导出工具
### 2.1 公共参数
@@ -148,3 +155,52 @@ Parse error: Missing required option: t
> tools/export-data.sh -ft tsfile -h 127.0.0.1 -p 6667 -u root -pw root
Parse error: Missing required option: t
```
+
+## 3. 基于数据订阅的 ExportTsFile
+
+IoTDB V2.0.4.x 支持的`export-tsfile.sh/bat` 脚本,能够自动创建以 TsFile 为 PayLoad 的数据订阅,将指定的数据文件导出为 TsFile 格式。
+
+### 3.1 运行命令
+
+```Shell
+# Unix/OS X
+> tools/export-tsfile.sh [-sql_dialect ] [-h ] [-p ]
+ [-u ] [-pw ] [-path ] [-start_time ] [-end_time ] [-t
+ ] [-tn ] [-help]
+
+# Windows
+> tools\windows>export-tsfile.bat [-sql_dialect ] [-h ] [-p ]
+ [-u ] [-pw ] [-path ] [-start_time ] [-end_time ] [-t
+ ] [-tn ] [-help]
+```
+
+### 3.2 脚本参数
+
+| 参数缩写 | 参数全称 | 参数含义 | 是否为必填项 | 默认值 |
+| -------------------- |-----------------|----------------------------------------------| -------------- | -------------------------------- |
+| `-sql_dialect` | `--sql_dialect` | 选择 server 是树模型还是表模型,当前支持 tree 和 table 类型 | 否 | `tree` |
+| `-h` | `--host` | 源数据所在服务节点 ip | 否 | `127.0.0.1` |
+| `-p` | `--port` | 源数据所在服务节点 port | 否 | `6667` |
+| `-u` | `--user` | 用户名 | 否 | `root` |
+| `-pw` | `--password` | 密码 | 否 | `root` |
+| `-t` | `-target` | 文件输出目录 | 否 | `$IOTDB_HOME/tools/target` |
+| `-path` | `--path` | 树模型导出的序列路径(树模型参数,默认生效),windows 中请讲参数值使用""包裹 | 否 | `root.**` |
+| `-start_time` | `--start_time` | 导出数据的开始时间 | 否 | - |
+| `-end_time` | `--end_time` | 导出数据的结束时间 | 否 | - |
+| `-tn` | `--thread_num` | 导出的并行数 | 否 | - |
+| `-help` | `--help` | 查看帮助 |||
+
+### 3.3 运行示例
+
+```Bash
+> tools\windows>export-tsfile.bat -sql_dialect tree -path "root.**"
+
+Starting IoTDB Client Export Script
+
+sequence-root.db-10-2887-1746520919075-1-1-0.tsfile
+sequence-root.db-9-2887-1746520891051-1-1-0.tsfile
+sequence-root.db-10-2889-1747361763179-1-0-0.tsfile
+Export TsFile Count: 3
+
+```
+