diff --git a/src/.vuepress/sidebar/V1.3.x/en.ts b/src/.vuepress/sidebar/V1.3.x/en.ts
index 828ee130c..d91f910b0 100644
--- a/src/.vuepress/sidebar/V1.3.x/en.ts
+++ b/src/.vuepress/sidebar/V1.3.x/en.ts
@@ -158,9 +158,11 @@ export const enSidebar = {
{ text: 'Data Import Export(V1.3.0/1/2)', link: 'Data-Import-Export-Tool' },
{ text: 'TsFile Import Export(V1.3.0/1/2)', link: 'TsFile-Import-Export-Tool' },
{ text: 'Data Import(V1.3.3)', link: 'Data-Import-Tool' },
- { text: 'Data Export(V1.3.3)', link: 'Data-Export-Tool' },
+ { text: 'Data Import(V1.3.4)', link: 'Data-Import-Tool-1-3-4' },
+ { text: 'Data Export(V1.3.3)', link: 'Data-Export-Tool' },
+ { text: 'Data Export(V1.3.4)', link: 'Data-Export-Tool-1-3-4' },
{ text: 'Full Backup Tool(V1.3.2)', link: 'Backup-Tool' },
- { text: 'Health Check Tool(V1.3.2)', link: 'Health-Check-Tool' },
+ { text: 'Health Check Tool(V1.3.2)', link: 'Health-Check-Tool' },
],
},
{
diff --git a/src/.vuepress/sidebar/V1.3.x/zh.ts b/src/.vuepress/sidebar/V1.3.x/zh.ts
index 65ac38299..e85b9eff9 100644
--- a/src/.vuepress/sidebar/V1.3.x/zh.ts
+++ b/src/.vuepress/sidebar/V1.3.x/zh.ts
@@ -145,9 +145,11 @@ export const zhSidebar = {
{ text: '数据导入导出(V1.3.0/1/2)', link: 'Data-Import-Export-Tool' },
{ text: 'TsFile导入导出(V1.3.0/1/2)', link: 'TsFile-Import-Export-Tool' },
{ text: '数据导入(V1.3.3)', link: 'Data-Import-Tool' },
- { text: '数据导出(V1.3.3)', link: 'Data-Export-Tool' },
+ { text: '数据导入(V1.3.4)', link: 'Data-Import-Tool-1-3-4' },
+ { text: '数据导出(V1.3.3)', link: 'Data-Export-Tool' },
+ { text: '数据导出(V1.3.4)', link: 'Data-Export-Tool-1-3-4' },
{ text: '全量备份工具(V1.3.2)', link: 'Backup-Tool' },
- { text: '健康检查工具(V1.3.2)', link: 'Health-Check-Tool' },
+ { text: '健康检查工具(V1.3.2)', link: 'Health-Check-Tool' },
],
},
{
diff --git a/src/.vuepress/sidebar_timecho/V1.3.x/en.ts b/src/.vuepress/sidebar_timecho/V1.3.x/en.ts
index e10c5233f..8ee86628c 100644
--- a/src/.vuepress/sidebar_timecho/V1.3.x/en.ts
+++ b/src/.vuepress/sidebar_timecho/V1.3.x/en.ts
@@ -172,9 +172,11 @@ export const enSidebar = {
{ text: 'Data Import Export(V1.3.0/1/2)', link: 'Data-Import-Export-Tool' },
{ text: 'TsFile Import Export(V1.3.0/1/2)', link: 'TsFile-Import-Export-Tool' },
{ text: 'Data Import(V1.3.3)', link: 'Data-Import-Tool' },
- { text: 'Data Export(V1.3.3)', link: 'Data-Export-Tool' },
+ { text: 'Data Import(V1.3.4)', link: 'Data-Import-Tool-1-3-4' },
+ { text: 'Data Export(V1.3.3)', link: 'Data-Export-Tool' },
+ { text: 'Data Export(V1.3.4)', link: 'Data-Export-Tool-1-3-4' },
{ text: 'Full Backup Tool(V1.3.2)', link: 'Backup-Tool' },
- { text: 'Health Check Tool(V1.3.2)', link: 'Health-Check-Tool' },
+ { text: 'Health Check Tool(V1.3.2)', link: 'Health-Check-Tool' },
],
},
{
diff --git a/src/.vuepress/sidebar_timecho/V1.3.x/zh.ts b/src/.vuepress/sidebar_timecho/V1.3.x/zh.ts
index 7f1b9533b..0e0a980b1 100644
--- a/src/.vuepress/sidebar_timecho/V1.3.x/zh.ts
+++ b/src/.vuepress/sidebar_timecho/V1.3.x/zh.ts
@@ -155,9 +155,11 @@ export const zhSidebar = {
{ text: '数据导入导出(V1.3.0/1/2)', link: 'Data-Import-Export-Tool' },
{ text: 'TsFile导入导出(V1.3.0/1/2)', link: 'TsFile-Import-Export-Tool' },
{ text: '数据导入(V1.3.3)', link: 'Data-Import-Tool' },
- { text: '数据导出(V1.3.3)', link: 'Data-Export-Tool' },
+ { text: '数据导入(V1.3.4)', link: 'Data-Import-Tool-1-3-4' },
+ { text: '数据导出(V1.3.3)', link: 'Data-Export-Tool' },
+ { text: '数据导出(V1.3.4)', link: 'Data-Export-Tool-1-3-4' },
{ text: '全量备份工具(V1.3.2)', link: 'Backup-Tool' },
- { text: '健康检查工具(V1.3.2)', link: 'Health-Check-Tool' },
+ { text: '健康检查工具(V1.3.2)', link: 'Health-Check-Tool' },
],
},
{
diff --git a/src/UserGuide/Master/Tree/Tools-System/Data-Import-Tool.md b/src/UserGuide/Master/Tree/Tools-System/Data-Import-Tool.md
index 75229ae09..3c71156b3 100644
--- a/src/UserGuide/Master/Tree/Tools-System/Data-Import-Tool.md
+++ b/src/UserGuide/Master/Tree/Tools-System/Data-Import-Tool.md
@@ -1,218 +1,200 @@
# Data Import
-## 1. IoTDB Data Import
-
-IoTDB currently supports importing data in CSV, SQL, and TsFile (IoTDB's underlying open-time series file format) into the database. The specific functionalities are as follows:
+## 1. Overview
+IoTDB supports two methods for data import:
+* Data Import Tool: Use the import-data.sh (Unix/OS X) or import-data.bat (Windows) script in the tools directory to manually import CSV, SQL, or TsFile (open-source time-series file format) data into IoTDB.
+* TsFile Auto-Loading Feature
- File Format
+ File Format
IoTDB Tool
Description
CSV
- import-data.sh/bat
+ import-data.sh/bat
Can be used for single or batch import of CSV files into IoTDB
- SQL
- import-data.sh/bat
+ SQL
Can be used for single or batch import of SQL files into IoTDB
- TsFile
- load-tsfile.sh/bat
+ TsFile
Can be used for single or batch import of TsFile files into IoTDB
- TsFile Active Listening & Loading Feature
- According to user configuration, it listens for changes in TsFile files in the specified path and loads newly added TsFile files into IoTDB
+ TsFile Auto-Loading Feature
+ Can automatically monitor a specified directory for newly generated TsFiles and load them into IoTDB.
-## 2. import-data Scripts
-
-- Supported formats: CSV、SQL
-
-### 2.1 Command
-
-```Bash
-# Unix/OS X
->tools/import-data.sh -h -p -u -pw -s [-fd <./failedDirectory> -aligned -batch -tp -typeInfer -lpf ]
-
-# Windows
->tools\import-data.bat -h -p -u -pw -s [-fd <./failedDirectory> -aligned -batch -tp -typeInfer -lpf ]
-```
-
-### 2.2 Parameter Introduction
-
-
-| **Parameter** | **Definition** | **Required** | **Default** |
-| --------- | ------------------------------------------------------------ | ------------ | ------------------------ |
-| -h | Hostname | No | 127.0.0.1 |
-| -p | Port | No | 6667 |
-| -u | Username | No | root |
-| -pw | Password | No | root |
-| -s | Specify the data to be imported, here you can specify files or folders. If a folder is specified, all files with suffixes of csv or sql in the folder will be batch imported (In V1.3.2, the parameter is `-f`) | Yes | |
-| -fd | Specify the directory for storing failed SQL files. If this parameter is not specified, failed files will be saved in the source data directory. Note: For unsupported SQL, illegal SQL, and failed SQL, they will be put into the failed directory under the failed file (default is the file name with `.failed` suffix) | No |The source filename with `.failed` suffix |
-| -aligned | Specify whether to use the `aligned` interface, options are true or false. Note: This parameter is only effective when importing csv files. | No | false |
-| -batch | Used to specify the number of data points per batch (minimum value is 1, maximum value is Integer.*MAX_VALUE*). If the program reports the error `org.apache.thrift.transport.TTransportException: Frame size larger than protect max size`, you can appropriately reduce this parameter. | No | 100000 |
-| -tp | Specify the time precision, options include `ms` (milliseconds), `ns` (nanoseconds), `us` (microseconds) | No | ms |
-| -lpf | Specify the number of data lines written per failed file (In V1.3.2, the parameter is `-linesPerFailedFile`) | No | 10000 |
-| -typeInfer | Used to specify type inference rules, such as . Note: Used to specify type inference rules. `srcTsDataType` includes `boolean`, `int`, `long`, `float`, `double`, `NaN`. `dstTsDataType` includes `boolean`, `int`, `long`, `float`, `double`, `text`. When `srcTsDataType` is `boolean`, `dstTsDataType` can only be `boolean` or `text`. When `srcTsDataType` is `NaN`, `dstTsDataType` can only be `float`, `double`, or `text`. When `srcTsDataType` is a numerical type, the precision of `dstTsDataType` needs to be higher than `srcTsDataType`. For example: `-typeInfer boolean=text,float=double` | No | |
-
-
-### 2.3 Running Example
-
-
-- Import the `dump0_0.sql` data in the current `data` directory to the local IoTDB database.
-
-```Bash
-# Unix/OS X
->tools/import-data.sh -s ./data/dump0_0.sql
-# Windows
->tools/import-data.bat -s ./data/dump0_0.sql
-```
-
-- Import all data in the current `data` directory in an aligned manner to the local IoTDB database.
-
-```Bash
+## 2. Data Import Tool
+### 2.1 Common Parameters
+
+| Short | Full Parameter | Description | Required | Default |
+| ------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- |-----------------------------------------------|
+| `-ft` | `--file_type` | File type: `csv`, `sql`, `tsfile`. | **Yes** | - |
+| `-h` | `--host` | IoTDB server hostname. | No | `127.0.0.1` |
+| `-p` | `--port` | IoTDB server port. | No | `6667` |
+| `-u` | `--username` | Username. | No | `root` |
+| `-pw` | `--password` | Password. | No | `root` |
+| `-s` | `--source` | Local path to the file/directory to import. **Supported formats**: CSV, SQL, TsFile. Unsupported formats trigger error: `The file name must end with "csv", "sql", or "tsfile"!` | **Yes** | - |
+| `-tn` | `--thread_num` | Maximum parallel threads | No | `8` Range: 0 to Integer.Max(2147483647). |
+| `-tz` | `--timezone` | Timezone (e.g., `+08:00`, `-01:00`). | No | System default |
+| `-help` | `--help` | Display help (general or format-specific: `-help csv`). | No | - |
+
+### 2.2 CSV Format
+
+#### 2.2.1 Command
+```Shell
# Unix/OS X
->tools/import-data.sh -s ./data/ -fd ./failed/ -aligned true
+> tools/import-data.sh -ft [-h ] [-p ] [-u ] [-pw ]
+ -s [-fd ] [-lpf ] [-aligned ]
+ [-ti ] [-tp ] [-tz ] [-batch ]
+ [-tn ]
+
# Windows
->tools/import-data.bat -s ./data/ -fd ./failed/ -aligned true
+> tools\import-data.bat -ft [-h ] [-p ] [-u ] [-pw ]
+ -s [-fd ] [-lpf ] [-aligned ]
+ [-ti ] [-tp ] [-tz ] [-batch ]
+ [-tn ]
```
-- Import the `dump0_0.csv` data in the current `data` directory to the local IoTDB database.
-
-```Bash
-# Unix/OS X
->tools/import-data.sh -s ./data/dump0_0.csv -fd ./failed/
-# Windows
->tools/import-data.bat -s ./data/dump0_0.csv -fd ./failed/
+#### 2.2.2 CSV-Specific Parameters
+
+| Short | Full Parameter | Description | Required | Default |
+| ---------------- | ------------------------------- |----------------------------------------------------------| ---------- |-----------------|
+| `-fd` | `--fail_dir` | Directory to save failed files. | No | YOUR_CSV_FILE_PATH |
+| `-lpf` | `--lines_per_failed_file` | Max lines per failed file. | No | `100000` Range: 0 to Integer.Max(2147483647). |
+| `-aligned` | `--use_aligned` | Import as aligned time series. | No | `false` |
+| `-batch` | `--batch_size` | Rows processed per API call. | No | `100000` Range: 0 to Integer.Max(2147483647). |
+| `-ti` | `--type_infer` | Type mapping (e.g., `BOOLEAN=text,INT=long`). | No | - |
+| `-tp` | `--timestamp_precision` | Timestamp precision: `ms`, `us`, `ns`. | No | `ms` |
+
+#### 2.2.3 Examples
+
+```Shell
+# Valid Example
+> tools/import-data.sh -ft csv -h 127.0.0.1 -p 6667 -u root -pw root -s /path/sql
+ -fd /path/failure/dir -lpf 100 -aligned true -ti "BOOLEAN=text,INT=long,FLOAT=double"
+ -tp ms -tz +08:00 -batch 5000 -tn 4
+
+# Error Example
+> tools/import-data.sh -ft csv -s /non_path
+error: Source file or directory /non_path does not exist
+
+> tools/import-data.sh -ft csv -s /path/sql -tn 0
+error: Invalid thread number '0'. Please set a positive integer.
```
-- Import the `dump0_0.csv` data in the current `data` directory in an aligned manner, batch import 100000 lines to the IoTDB database on the host with IP `192.168.100.1`, record failures in the current `failed` directory, with a maximum of 1000 lines per file.
+### 2.3 SQL Format
+#### 2.3.1 Command
-```Bash
+```Shell
# Unix/OS X
->tools/import-data.sh -h 192.168.100.1 -p 6667 -u root -pw root -s ./data/dump0_0.csv -fd ./failed/ -aligned true -batch 100000 -tp ms -typeInfer boolean=text,float=double -lpf 1000
+> tools/import-data.sh -ft [-h ] [-p ] [-u ] [-pw ]
+ -s [-fd ] [-lpf ] [-tz ]
+ [-batch ] [-tn ]
+
# Windows
->tools/import-data.bat -h 192.168.100.1 -p 6667 -u root -pw root -s ./data/dump0_0.csv -fd ./failed/ -aligned true -batch 100000 -tp ms -typeInfer boolean=text,float=double -lpf 1000
+> tools\import-data.bat -ft [-h ] [-p ] [-u ] [-pw ]
+ -s [-fd ] [-lpf ] [-tz ]
+ [-batch ] [-tn ]
```
+#### 2.3.2 SQL-Specific Parameters
-## 3. load-tsfile Script
+| Short | Full Parameter | Description | Required | Default |
+| -------------- | ------------------------------- | -------------------------------------------------------------------- | ---------- | ------------------ |
+| `-fd` | `--fail_dir` | Directory to save failed files. | No |YOUR_CSV_FILE_PATH|
+| `-lpf` | `--lines_per_failed_file` | Max lines per failed file. | No | `100000` Range: 0 to Integer.Max(2147483647). |
+| `-batch` | `--batch_size` | Rows processed per API call. | No | `100000` Range: 0 to Integer.Max(2147483647). |
-- Supported formats: TsFile
+#### 2.3.3 Examples
-### 3.1 Command
+```Shell
+# Valid Example
+> tools/import-data.sh -ft sql -h 127.0.0.1 -p 6667 -u root -pw root -s /path/sql
+ -fd /path/failure/dir -lpf 500 -tz +08:00
+ -batch 100000 -tn 4
+
+# Error Example
+> tools/import-data.sh -ft sql -s /path/sql -fd /non_path
+error: Source file or directory /path/sql does not exist
-```Bash
-# Unix/OS X
->tools/load-tsfile.sh -h -p -u -pw -s -os [-sd ] -of [-fd ] [-tn ]
-# Windows
->tools\load-tsfile.bat -h -p -u -pw -s -os [-sd ] -of [-fd ] [-tn ]
+> tools/import-data.sh -ft sql -s /path/sql -tn 0
+error: Invalid thread number '0'. Please set a positive integer.
```
+### 2.4 TsFile Format
-### 3.2 Parameter Introduction
-
-
-| **Parameter** | **Description** | **Required** | **Default** |
-| -------- | ------------------------------------------------------------ | ----------------------------------- | ------------------- |
-| -h | Hostname | No | root |
-| -p | Port | No | root |
-| -u | Username | No | 127.0.0.1 |
-| -pw | Password | No | 6667 |
-| -s | The local directory path of the script file (folder) to be loaded | Yes | |
-| -os | none: Do not delete mv: Move successful files to the target folder cp: Hard link (copy) successful files to the target folder delete: Delete | Yes | |
-| -sd | When --on_success is mv or cp, the target folder for mv or cp. The file name of the file becomes the folder flattened and then concatenated with the original file name. | When --on_success is mv or cp, it is required to fill in Yes | ${EXEC_DIR}/success |
-| -of | none: Skip mv: Move failed files to the target folder cp: Hard link (copy) failed files to the target folder delete: Delete | Yes | |
-| -fd | When --on_fail is specified as mv or cp, the target folder for mv or cp. The file name of the file becomes the folder flattened and then concatenated with the original file name. | When --on_fail is specified as mv or cp, it is required to fill in | ${EXEC_DIR}/fail |
-| -tn | Maximum number of parallel threads | Yes | 8 |
-
-
+#### 2.4.1 Command
-### 3.3 Running Examples
-
-
-```Bash
+```Shell
# Unix/OS X
-> tools/load-tsfile.sh -h 127.0.0.1 -p 6667 -u root -pw root -s /path/sql -os delete -of delete -tn 8
-> tools/load-tsfile.sh -h 127.0.0.1 -p 6667 -u root -pw root -s /path/sql -os mv -of cp -sd /path/success/dir -fd /path/failure/dir -tn 8
-
+> tools/import-data.sh -ft [-h ] [-p ] [-u ] [-pw ]
+ -s -os [-sd ] -of [-fd ]
+ [-tn ] [-tz ] [-tp ]
+
# Windows
-> tools/load_data.bat -h 127.0.0.1 -p 6667 -u root -pw root -s /path/sql -os mv -of cp -sd /path/success/dir -fd /path/failure/dir -tn 8
-> tools/load_data.bat -h 127.0.0.1 -p 6667 -u root -pw root -s /path/sql -os delete -of delete -tn 8
+> tools\import-data.bat -ft [-h ] [-p ] [-u ] [-pw ]
+ -s -os [-sd ] -of [-fd ]
+ [-tn ] [-tz ] [-tp ]
+```
+#### 2.4.2 TsFile-Specific Parameters
+
+| Short | Full Parameter | Description | Required | Default |
+| ----------- | ----------------------------- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ----------------- | --------------------------- |
+| `-os` | `--on_success` | Action for successful files: `none`: Do not delete the file. `mv`: Move the successful file to the target directory. `cp`:Create a hard link (copy) of the successful file to the target directory. `delete`:Delete the file. | **Yes** | - |
+| `-sd` | `--success_dir` | Target directory for `mv`/`cp` actions on success. Required if `-os` is `mv`/`cp`. The file name will be flattened and concatenated with the original file name. | Conditional | `${EXEC_DIR}/success` |
+| `-of` | `--on_fail` | Action for failed files: `none`:Skip the file. `mv`:Move the failed file to the target directory. `cp`:Create a hard link (copy) of the failed file to the target directory. `delete`:Delete the file.. | **Yes** | - |
+| `-fd` | `--fail_dir` | Target directory for `mv`/`cp` actions on failure. Required if `-of` is `mv`/`cp`. The file name will be flattened and concatenated with the original file name. | Conditional | `${EXEC_DIR}/fail` |
+| `-tp` | `--timestamp_precision` | TsFile timestamp precision: `ms`, `us`, `ns`. For non-remote TsFile imports: Use -tp to specify the timestamp precision of the TsFile. The system will manually verify if the timestamp precision matches the server. If it does not match, an error will be returned. For remote TsFile imports: Use -tp to specify the timestamp precision of the TsFile. The Pipe system will automatically verify if the timestamp precision matches. If it does not match, a Pipe error will be returned. | No | `ms` |
+
+#### 2.4.3 Examples
+
+```Shell
+# Valid Example
+> tools/import-data.sh -ft tsfile -h 127.0.0.1 -p 6667 -u root -pw root
+ -s /path/sql -os mv -of cp -sd /path/success/dir -fd /path/failure/dir
+ -tn 8 -tz +08:00 -tp ms
+
+# Error Example
+> tools/import-data.sh -ft tsfile -s /path/sql -os mv -of cp
+ -fd /path/failure/dir -tn 8
+error: Missing option --success_dir (or -sd) when --on_success is 'mv' or 'cp'
+
+> tools/import-data.sh -ft tsfile -s /path/sql -os mv -of cp
+ -sd /path/success/dir -fd /path/failure/dir -tn 0
+error: Invalid thread number '0'. Please set a positive integer.
```
-
-## 4. TsFile Active Listening & Loading Feature
-
-The TsFile Active Listening & Loading Feature can actively monitor TsFile file changes in the specified target path (configured by the user) and automatically synchronize TsFile files from the target path to the specified reception path (configured by the user). Through this feature, IoTDB can automatically detect and load these files without the need for any additional manual loading operations. This automated process not only simplifies the user's operational steps but also reduces potential errors that may occur during the operation, effectively reducing the complexity for users during the usage process.
-
-
-
-
-### 4.1 Configuration Parameters
-
-You can enable the TsFile Active Listening & Loading Feature by finding the following parameters in the configuration file template `iotdb-system.properties.template` and adding them to the IoTDB configuration file `iotdb-system.properties`. The complete configuration is as follows:
-
-
-| **Configuration Parameter** | **Description** | **Value Range** | **Required** | **Default Value** | **Loading Method** |
-| -------------------------------------------- | ------------------------------------------------------------ | -------------------------- | ------------ | ---------------------- | ---------------- |
-| load_active_listening_enable | Whether to enable the DataNode's active listening and loading of tsfile functionality (default is enabled). | Boolean: true,false | Optional | true | Hot Loading |
-| load_active_listening_dirs | The directories to be listened to (automatically includes subdirectories of the directory), if there are multiple, separate with “,”. The default directory is ext/load/pending (supports hot loading). | String: one or more file directories | Optional | ext/load/pending | Hot Loading |
-| load_active_listening_fail_dir | The directory to which files are transferred after the execution of loading tsfile files fails, only one directory can be configured. | String: one file directory | Optional | ext/load/failed | Hot Loading |
-| load_active_listening_max_thread_num | The maximum number of threads to perform loading tsfile tasks simultaneously. The default value when the parameter is commented out is max(1, CPU core count / 2). When the user sets a value not in the range [1, CPU core count / 2], it will be set to the default value (1, CPU core count / 2). | Long: [1, Long.MAX_VALUE] | Optional | max(1, CPU core count / 2) | Effective after restart |
-| load_active_listening_check_interval_seconds | Active listening polling interval in seconds. The function of actively listening to tsfile is achieved by polling the folder. This configuration specifies the time interval between two checks of load_active_listening_dirs, and the next check will be executed after load_active_listening_check_interval_seconds seconds of each check. When the user sets the polling interval to less than 1, it will be set to the default value of 5 seconds. | Long: [1, Long.MAX_VALUE] | Optional | 5 | Effective after restart |
-
-
-### 4.2 Precautions
-
-1. If there is a mods file in the files to be loaded, the mods file should be moved to the listening directory first, and then the tsfile files should be moved, with the mods file and the corresponding tsfile file in the same directory. This prevents the loading of tsfile files without the corresponding mods files.
-```SQL
-FUNCTION moveFilesToListeningDirectory(sourceDirectory, listeningDirectory)
- // Move mods files
- modsFiles = searchFiles(sourceDirectory, "*mods*")
- IF modsFiles IS NOT EMPTY
- FOR EACH file IN modsFiles
- MOVE(file, listeningDirectory)
- END FOR
- END IF
+## 3. TsFile Auto-Loading
- // Move tsfile files
- tsfileFiles = searchFiles(sourceDirectory, "*tsfile*")
- IF tsfileFiles IS NOT EMPTY
- FOR EACH file IN tsfileFiles
- MOVE(file, listeningDirectory)
- END FOR
- END IF
-END FUNCTION
+This feature enables IoTDB to automatically monitor a specified directory for new TsFiles and load them into the database without manual intervention.
-FUNCTION searchFiles(directory, pattern)
- matchedFiles = []
- FOR EACH file IN directory.files
- IF file.name MATCHES pattern
- APPEND file TO matchedFiles
- END IF
- END FOR
- RETURN matchedFiles
-END FUNCTION
+
-FUNCTION MOVE(sourceFile, targetDirectory)
- // Implement the logic of moving files from sourceFile to targetDirectory
-END FUNCTION
-```
+### 3.1 Configuration
-2. Prohibit setting the receiver directory of Pipe, the data directory for storing data, etc., as the listening directory.
+Add the following parameters to `iotdb-system.properties` (template: `iotdb-system.properties.template`):
-3. Prohibit `load_active_listening_fail_dir` from having the same directory as `load_active_listening_dirs`, or each other's nesting.
+| Parameter | Description | Value Range | Required | Default | Hot-Load? |
+| ---------------------------------------------------- |---------------------------------------------------------------------------------------| --------------------------------- | ---------- | ----------------------------- | ----------------------- |
+| `load_active_listening_enable` | Enable auto-loading. | `true`/`false` | Optional | `true` | Yes |
+| `load_active_listening_dirs` | Directories to monitor (subdirectories included). Multiple paths separated by commas. | String | Optional | `ext/load/pending` | Yes |
+| `load_active_listening_fail_dir` | Directory to store failed TsFiles. Only can set one. | String | Optional | `ext/load/failed` | Yes |
+| `load_active_listening_max_thread_num` | Maximum Threads for TsFile Loading Tasks:The default value for this parameter, when commented out, is max(1, CPU cores / 2). If the value set by the user falls outside the range [1, CPU cores / 2], it will be reset to the default value of max(1, CPU cores / 2). | `1` to `Long.MAX_VALUE` | Optional | `max(1, CPU_CORES / 2)` | No (restart required) |
+| `load_active_listening_check_interval_seconds` | Active Listening Polling Interval (in seconds):The active listening feature for TsFiles is implemented through polling the target directory. This configuration specifies the time interval between two consecutive checks of the `load_active_listening_dirs`. After each check, the next check will be performed after `load_active_listening_check_interval_seconds` seconds. If the polling interval set by the user is less than 1, it will be reset to the default value of 5 seconds. | `1` to `Long.MAX_VALUE` | Optional | `5` | No (restart required) |
-4. Ensure that the `load_active_listening_dirs` directory has sufficient permissions. After the load is successful, the files will be deleted. If there is no delete permission, it will lead to repeated loading.
+### 3.2 Notes
+1. **Mods Files**: If TsFiles have associated `.mods` files, move `.mods` files to the monitored directory **before** their corresponding TsFiles. Ensure `.mods` and TsFiles are in the same directory.
+2. **Restricted Directories**: Do NOT set Pipe receiver directories, data directories, or other system paths as monitored directories.
+3. **Directory Conflicts**: Ensure `load_active_listening_fail_dir` does not overlap with `load_active_listening_dirs` or its subdirectories.
+4. **Permissions**: The monitored directory must have write permissions. Files are deleted after successful loading; insufficient permissions may cause duplicate loading.
diff --git a/src/UserGuide/V1.3.x/Tools-System/Data-Import-Tool-1-3-4.md b/src/UserGuide/V1.3.x/Tools-System/Data-Import-Tool-1-3-4.md
new file mode 100644
index 000000000..645fa6bd7
--- /dev/null
+++ b/src/UserGuide/V1.3.x/Tools-System/Data-Import-Tool-1-3-4.md
@@ -0,0 +1,200 @@
+# Data Import
+
+## 1. Overview
+IoTDB supports two methods for data import:
+* Data Import Tool: Use the import-data.sh (Unix/OS X) or import-data.bat (Windows) script in the tools directory to manually import CSV, SQL, or TsFile (open-source time-series file format) data into IoTDB.
+* TsFile Auto-Loading Feature
+
+
+
+ File Format
+ IoTDB Tool
+ Description
+
+
+ CSV
+ import-data.sh/bat
+ Can be used for single or batch import of CSV files into IoTDB
+
+
+ SQL
+ Can be used for single or batch import of SQL files into IoTDB
+
+
+ TsFile
+ Can be used for single or batch import of TsFile files into IoTDB
+
+
+ TsFile Auto-Loading Feature
+ Can automatically monitor a specified directory for newly generated TsFiles and load them into IoTDB.
+
+
+
+
+## 2. Data Import Tool
+### 2.1 Common Parameters
+
+| Short | Full Parameter | Description | Required | Default |
+| ------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- |-----------------------------------------------|
+| `-ft` | `--file_type` | File type: `csv`, `sql`, `tsfile`. | **Yes** | - |
+| `-h` | `--host` | IoTDB server hostname. | No | `127.0.0.1` |
+| `-p` | `--port` | IoTDB server port. | No | `6667` |
+| `-u` | `--username` | Username. | No | `root` |
+| `-pw` | `--password` | Password. | No | `root` |
+| `-s` | `--source` | Local path to the file/directory to import. **Supported formats**: CSV, SQL, TsFile. Unsupported formats trigger error: `The file name must end with "csv", "sql", or "tsfile"!` | **Yes** | - |
+| `-tn` | `--thread_num` | Maximum parallel threads | No | `8` Range: 0 to Integer.Max(2147483647). |
+| `-tz` | `--timezone` | Timezone (e.g., `+08:00`, `-01:00`). | No | System default |
+| `-help` | `--help` | Display help (general or format-specific: `-help csv`). | No | - |
+
+### 2.2 CSV Format
+
+#### 2.2.1 Command
+```Shell
+# Unix/OS X
+> tools/import-data.sh -ft [-h ] [-p ] [-u ] [-pw ]
+ -s [-fd ] [-lpf ] [-aligned ]
+ [-ti ] [-tp ] [-tz ] [-batch ]
+ [-tn ]
+
+# Windows
+> tools\import-data.bat -ft [-h ] [-p ] [-u ] [-pw ]
+ -s [-fd ] [-lpf ] [-aligned ]
+ [-ti ] [-tp ] [-tz ] [-batch ]
+ [-tn ]
+```
+
+#### 2.2.2 CSV-Specific Parameters
+
+| Short | Full Parameter | Description | Required | Default |
+| ---------------- | ------------------------------- |----------------------------------------------------------| ---------- |-----------------|
+| `-fd` | `--fail_dir` | Directory to save failed files. | No | YOUR_CSV_FILE_PATH |
+| `-lpf` | `--lines_per_failed_file` | Max lines per failed file. | No | `100000` Range: 0 to Integer.Max(2147483647). |
+| `-aligned` | `--use_aligned` | Import as aligned time series. | No | `false` |
+| `-batch` | `--batch_size` | Rows processed per API call. | No | `100000` Range: 0 to Integer.Max(2147483647). |
+| `-ti` | `--type_infer` | Type mapping (e.g., `BOOLEAN=text,INT=long`). | No | - |
+| `-tp` | `--timestamp_precision` | Timestamp precision: `ms`, `us`, `ns`. | No | `ms` |
+
+#### 2.2.3 Examples
+
+```Shell
+# Valid Example
+> tools/import-data.sh -ft csv -h 127.0.0.1 -p 6667 -u root -pw root -s /path/sql
+ -fd /path/failure/dir -lpf 100 -aligned true -ti "BOOLEAN=text,INT=long,FLOAT=double"
+ -tp ms -tz +08:00 -batch 5000 -tn 4
+
+# Error Example
+> tools/import-data.sh -ft csv -s /non_path
+error: Source file or directory /non_path does not exist
+
+> tools/import-data.sh -ft csv -s /path/sql -tn 0
+error: Invalid thread number '0'. Please set a positive integer.
+```
+
+### 2.3 SQL Format
+
+#### 2.3.1 Command
+
+```Shell
+# Unix/OS X
+> tools/import-data.sh -ft [-h ] [-p ] [-u ] [-pw ]
+ -s [-fd ] [-lpf ] [-tz ]
+ [-batch ] [-tn ]
+
+# Windows
+> tools\import-data.bat -ft [-h ] [-p ] [-u ] [-pw ]
+ -s [-fd ] [-lpf ] [-tz ]
+ [-batch ] [-tn ]
+```
+
+#### 2.3.2 SQL-Specific Parameters
+
+| Short | Full Parameter | Description | Required | Default |
+| -------------- | ------------------------------- | -------------------------------------------------------------------- | ---------- | ------------------ |
+| `-fd` | `--fail_dir` | Directory to save failed files. | No |YOUR_CSV_FILE_PATH|
+| `-lpf` | `--lines_per_failed_file` | Max lines per failed file. | No | `100000` Range: 0 to Integer.Max(2147483647). |
+| `-batch` | `--batch_size` | Rows processed per API call. | No | `100000` Range: 0 to Integer.Max(2147483647). |
+
+#### 2.3.3 Examples
+
+```Shell
+# Valid Example
+> tools/import-data.sh -ft sql -h 127.0.0.1 -p 6667 -u root -pw root -s /path/sql
+ -fd /path/failure/dir -lpf 500 -tz +08:00
+ -batch 100000 -tn 4
+
+# Error Example
+> tools/import-data.sh -ft sql -s /path/sql -fd /non_path
+error: Source file or directory /path/sql does not exist
+
+
+> tools/import-data.sh -ft sql -s /path/sql -tn 0
+error: Invalid thread number '0'. Please set a positive integer.
+```
+### 2.4 TsFile Format
+
+#### 2.4.1 Command
+
+```Shell
+# Unix/OS X
+> tools/import-data.sh -ft [-h ] [-p ] [-u ] [-pw ]
+ -s -os [-sd ] -of [-fd ]
+ [-tn ] [-tz ] [-tp ]
+
+# Windows
+> tools\import-data.bat -ft [-h ] [-p ] [-u ] [-pw ]
+ -s -os [-sd ] -of [-fd ]
+ [-tn ] [-tz ] [-tp ]
+```
+#### 2.4.2 TsFile-Specific Parameters
+
+| Short | Full Parameter | Description | Required | Default |
+| ----------- | ----------------------------- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ----------------- | --------------------------- |
+| `-os` | `--on_success` | Action for successful files: `none`: Do not delete the file. `mv`: Move the successful file to the target directory. `cp`:Create a hard link (copy) of the successful file to the target directory. `delete`:Delete the file. | **Yes** | - |
+| `-sd` | `--success_dir` | Target directory for `mv`/`cp` actions on success. Required if `-os` is `mv`/`cp`. The file name will be flattened and concatenated with the original file name. | Conditional | `${EXEC_DIR}/success` |
+| `-of` | `--on_fail` | Action for failed files: `none`:Skip the file. `mv`:Move the failed file to the target directory. `cp`:Create a hard link (copy) of the failed file to the target directory. `delete`:Delete the file.. | **Yes** | - |
+| `-fd` | `--fail_dir` | Target directory for `mv`/`cp` actions on failure. Required if `-of` is `mv`/`cp`. The file name will be flattened and concatenated with the original file name. | Conditional | `${EXEC_DIR}/fail` |
+| `-tp` | `--timestamp_precision` | TsFile timestamp precision: `ms`, `us`, `ns`. For non-remote TsFile imports: Use -tp to specify the timestamp precision of the TsFile. The system will manually verify if the timestamp precision matches the server. If it does not match, an error will be returned. For remote TsFile imports: Use -tp to specify the timestamp precision of the TsFile. The Pipe system will automatically verify if the timestamp precision matches. If it does not match, a Pipe error will be returned. | No | `ms` |
+
+#### 2.4.3 Examples
+
+```Shell
+# Valid Example
+> tools/import-data.sh -ft tsfile -h 127.0.0.1 -p 6667 -u root -pw root
+ -s /path/sql -os mv -of cp -sd /path/success/dir -fd /path/failure/dir
+ -tn 8 -tz +08:00 -tp ms
+
+# Error Example
+> tools/import-data.sh -ft tsfile -s /path/sql -os mv -of cp
+ -fd /path/failure/dir -tn 8
+error: Missing option --success_dir (or -sd) when --on_success is 'mv' or 'cp'
+
+> tools/import-data.sh -ft tsfile -s /path/sql -os mv -of cp
+ -sd /path/success/dir -fd /path/failure/dir -tn 0
+error: Invalid thread number '0'. Please set a positive integer.
+```
+
+
+## 3. TsFile Auto-Loading
+
+This feature enables IoTDB to automatically monitor a specified directory for new TsFiles and load them into the database without manual intervention.
+
+
+
+### 3.1 Configuration
+
+Add the following parameters to `iotdb-system.properties` (template: `iotdb-system.properties.template`):
+
+| Parameter | Description | Value Range | Required | Default | Hot-Load? |
+| ---------------------------------------------------- |---------------------------------------------------------------------------------------| --------------------------------- | ---------- | ----------------------------- | ----------------------- |
+| `load_active_listening_enable` | Enable auto-loading. | `true`/`false` | Optional | `true` | Yes |
+| `load_active_listening_dirs` | Directories to monitor (subdirectories included). Multiple paths separated by commas. | String | Optional | `ext/load/pending` | Yes |
+| `load_active_listening_fail_dir` | Directory to store failed TsFiles. Only can set one. | String | Optional | `ext/load/failed` | Yes |
+| `load_active_listening_max_thread_num` | Maximum Threads for TsFile Loading Tasks:The default value for this parameter, when commented out, is max(1, CPU cores / 2). If the value set by the user falls outside the range [1, CPU cores / 2], it will be reset to the default value of max(1, CPU cores / 2). | `1` to `Long.MAX_VALUE` | Optional | `max(1, CPU_CORES / 2)` | No (restart required) |
+| `load_active_listening_check_interval_seconds` | Active Listening Polling Interval (in seconds):The active listening feature for TsFiles is implemented through polling the target directory. This configuration specifies the time interval between two consecutive checks of the `load_active_listening_dirs`. After each check, the next check will be performed after `load_active_listening_check_interval_seconds` seconds. If the polling interval set by the user is less than 1, it will be reset to the default value of 5 seconds. | `1` to `Long.MAX_VALUE` | Optional | `5` | No (restart required) |
+
+### 3.2 Notes
+
+1. **Mods Files**: If TsFiles have associated `.mods` files, move `.mods` files to the monitored directory **before** their corresponding TsFiles. Ensure `.mods` and TsFiles are in the same directory.
+2. **Restricted Directories**: Do NOT set Pipe receiver directories, data directories, or other system paths as monitored directories.
+3. **Directory Conflicts**: Ensure `load_active_listening_fail_dir` does not overlap with `load_active_listening_dirs` or its subdirectories.
+4. **Permissions**: The monitored directory must have write permissions. Files are deleted after successful loading; insufficient permissions may cause duplicate loading.
diff --git a/src/UserGuide/dev-1.3/Tools-System/Data-Import-Tool-1-3-4.md b/src/UserGuide/dev-1.3/Tools-System/Data-Import-Tool-1-3-4.md
new file mode 100644
index 000000000..645fa6bd7
--- /dev/null
+++ b/src/UserGuide/dev-1.3/Tools-System/Data-Import-Tool-1-3-4.md
@@ -0,0 +1,200 @@
+# Data Import
+
+## 1. Overview
+IoTDB supports two methods for data import:
+* Data Import Tool: Use the import-data.sh (Unix/OS X) or import-data.bat (Windows) script in the tools directory to manually import CSV, SQL, or TsFile (open-source time-series file format) data into IoTDB.
+* TsFile Auto-Loading Feature
+
+
+
+ File Format
+ IoTDB Tool
+ Description
+
+
+ CSV
+ import-data.sh/bat
+ Can be used for single or batch import of CSV files into IoTDB
+
+
+ SQL
+ Can be used for single or batch import of SQL files into IoTDB
+
+
+ TsFile
+ Can be used for single or batch import of TsFile files into IoTDB
+
+
+ TsFile Auto-Loading Feature
+ Can automatically monitor a specified directory for newly generated TsFiles and load them into IoTDB.
+
+
+
+
+## 2. Data Import Tool
+### 2.1 Common Parameters
+
+| Short | Full Parameter | Description | Required | Default |
+| ------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- |-----------------------------------------------|
+| `-ft` | `--file_type` | File type: `csv`, `sql`, `tsfile`. | **Yes** | - |
+| `-h` | `--host` | IoTDB server hostname. | No | `127.0.0.1` |
+| `-p` | `--port` | IoTDB server port. | No | `6667` |
+| `-u` | `--username` | Username. | No | `root` |
+| `-pw` | `--password` | Password. | No | `root` |
+| `-s` | `--source` | Local path to the file/directory to import. **Supported formats**: CSV, SQL, TsFile. Unsupported formats trigger error: `The file name must end with "csv", "sql", or "tsfile"!` | **Yes** | - |
+| `-tn` | `--thread_num` | Maximum parallel threads | No | `8` Range: 0 to Integer.Max(2147483647). |
+| `-tz` | `--timezone` | Timezone (e.g., `+08:00`, `-01:00`). | No | System default |
+| `-help` | `--help` | Display help (general or format-specific: `-help csv`). | No | - |
+
+### 2.2 CSV Format
+
+#### 2.2.1 Command
+```Shell
+# Unix/OS X
+> tools/import-data.sh -ft [-h ] [-p ] [-u ] [-pw ]
+ -s [-fd ] [-lpf ] [-aligned ]
+ [-ti ] [-tp ] [-tz ] [-batch ]
+ [-tn ]
+
+# Windows
+> tools\import-data.bat -ft [-h ] [-p ] [-u ] [-pw ]
+ -s [-fd ] [-lpf ] [-aligned ]
+ [-ti ] [-tp ] [-tz ] [-batch ]
+ [-tn ]
+```
+
+#### 2.2.2 CSV-Specific Parameters
+
+| Short | Full Parameter | Description | Required | Default |
+| ---------------- | ------------------------------- |----------------------------------------------------------| ---------- |-----------------|
+| `-fd` | `--fail_dir` | Directory to save failed files. | No | YOUR_CSV_FILE_PATH |
+| `-lpf` | `--lines_per_failed_file` | Max lines per failed file. | No | `100000` Range: 0 to Integer.Max(2147483647). |
+| `-aligned` | `--use_aligned` | Import as aligned time series. | No | `false` |
+| `-batch` | `--batch_size` | Rows processed per API call. | No | `100000` Range: 0 to Integer.Max(2147483647). |
+| `-ti` | `--type_infer` | Type mapping (e.g., `BOOLEAN=text,INT=long`). | No | - |
+| `-tp` | `--timestamp_precision` | Timestamp precision: `ms`, `us`, `ns`. | No | `ms` |
+
+#### 2.2.3 Examples
+
+```Shell
+# Valid Example
+> tools/import-data.sh -ft csv -h 127.0.0.1 -p 6667 -u root -pw root -s /path/sql
+ -fd /path/failure/dir -lpf 100 -aligned true -ti "BOOLEAN=text,INT=long,FLOAT=double"
+ -tp ms -tz +08:00 -batch 5000 -tn 4
+
+# Error Example
+> tools/import-data.sh -ft csv -s /non_path
+error: Source file or directory /non_path does not exist
+
+> tools/import-data.sh -ft csv -s /path/sql -tn 0
+error: Invalid thread number '0'. Please set a positive integer.
+```
+
+### 2.3 SQL Format
+
+#### 2.3.1 Command
+
+```Shell
+# Unix/OS X
+> tools/import-data.sh -ft [-h ] [-p ] [-u ] [-pw ]
+ -s [-fd ] [-lpf ] [-tz ]
+ [-batch ] [-tn ]
+
+# Windows
+> tools\import-data.bat -ft [-h ] [-p ] [-u ] [-pw ]
+ -s [-fd ] [-lpf ] [-tz ]
+ [-batch ] [-tn ]
+```
+
+#### 2.3.2 SQL-Specific Parameters
+
+| Short | Full Parameter | Description | Required | Default |
+| -------------- | ------------------------------- | -------------------------------------------------------------------- | ---------- | ------------------ |
+| `-fd` | `--fail_dir` | Directory to save failed files. | No |YOUR_CSV_FILE_PATH|
+| `-lpf` | `--lines_per_failed_file` | Max lines per failed file. | No | `100000` Range: 0 to Integer.Max(2147483647). |
+| `-batch` | `--batch_size` | Rows processed per API call. | No | `100000` Range: 0 to Integer.Max(2147483647). |
+
+#### 2.3.3 Examples
+
+```Shell
+# Valid Example
+> tools/import-data.sh -ft sql -h 127.0.0.1 -p 6667 -u root -pw root -s /path/sql
+ -fd /path/failure/dir -lpf 500 -tz +08:00
+ -batch 100000 -tn 4
+
+# Error Example
+> tools/import-data.sh -ft sql -s /path/sql -fd /non_path
+error: Source file or directory /path/sql does not exist
+
+
+> tools/import-data.sh -ft sql -s /path/sql -tn 0
+error: Invalid thread number '0'. Please set a positive integer.
+```
+### 2.4 TsFile Format
+
+#### 2.4.1 Command
+
+```Shell
+# Unix/OS X
+> tools/import-data.sh -ft [-h ] [-p ] [-u ] [-pw ]
+ -s -os [-sd ] -of [-fd ]
+ [-tn