You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/UserGuide/V1.3.x/Tools-System/Data-Import-Tool-1-3-4.md
+47-2Lines changed: 47 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,10 @@
1
1
# Data Import
2
2
3
3
## 1. Overview
4
-
IoTDB supports two methods for data import:
4
+
IoTDB supports three methods for data import:
5
5
* 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.
6
6
* TsFile Auto-Loading Feature
7
+
* Load `TsFile` SQL
7
8
8
9
<tablestyle="text-align: left;">
9
10
<tbody>
@@ -21,13 +22,17 @@ IoTDB supports two methods for data import:
21
22
<td>Can be used for single or batch import of SQL files into IoTDB</td>
22
23
</tr>
23
24
<tr>
24
-
<td rowspan="2">TsFile</td>
25
+
<td rowspan="3">TsFile</td>
25
26
<td>Can be used for single or batch import of TsFile files into IoTDB</td>
26
27
</tr>
27
28
<tr>
28
29
<td>TsFile Auto-Loading Feature</td>
29
30
<td>Can automatically monitor a specified directory for newly generated TsFiles and load them into IoTDB.</td>
30
31
</tr>
32
+
<tr>
33
+
<td>Load SQL</td>
34
+
<td>Can be used for single or batch import of TsFile files into IoTDB</td>
35
+
</tr>
31
36
</tbody>
32
37
</table>
33
38
@@ -242,3 +247,43 @@ Add the following parameters to `iotdb-system.properties` (template: `iotdb-syst
242
247
2. **Restricted Directories**: Do NOT set Pipe receiver directories, data directories, or other system paths as monitored directories.
243
248
3. **Directory Conflicts**: Ensure `load_active_listening_fail_dir` does not overlap with `load_active_listening_dirs` or its subdirectories.
244
249
4. **Permissions**: The monitored directory must have write permissions. Files are deleted after successful loading; insufficient permissions may cause duplicate loading.
250
+
251
+
## 4. Load SQL
252
+
253
+
IoTDB supports importing one or multiple TsFile files containing time series into another running IoTDB instance directly via SQL execution through the CLI.
254
+
255
+
### 4.1 Command
256
+
257
+
```SQL
258
+
load '<path/dir>' with (
259
+
'attribute-key1'='attribute-value1',
260
+
'attribute-key2'='attribute-value2',
261
+
)
262
+
```
263
+
264
+
*`<path/dir>` : The path to a TsFile or a folder containing multiple TsFiles.
265
+
*`<attributes>`: Optional parameters, as described below.
266
+
267
+
| Key | Key Description | Value Type | Value Range | Value is Required | Default Value |
|`database-level`| When the database corresponding to the TsFile does not exist, the database hierarchy level can be specified via the ` database-level` parameter. The default is the level set in `iotdb-common.properties`. For example, setting level=1 means the prefix path of level 1 in all time series in the TsFile will be used as the database. | Integer |`[1: Integer.MAX_VALUE]`| No | 1 |
270
+
|`on-success`| Action for successfully loaded TsFiles: `delete` (delete the TsFile after successful import) or `none` (retain the TsFile in the source folder). | String |`delete / none`| No | delete |
271
+
|`convert-on-type-mismatch`| Whether to perform type conversion during loading if data types in the TsFile mismatch the target schema. | Boolean |`true / false`| No | true |
272
+
|`verify`| Whether to validate the schema before loading the TsFile. | Boolean |`true / false`| No | true |
273
+
|`tablet-conversion-threshold`| Size threshold (in bytes) for converting TsFiles into tablet format during loading. Default: `-1` (no conversion for any TsFile).(Available since v1.3.6) | Integer |`[-1,0 :``Integer.MAX_VALUE]`| No | -1 |
274
+
275
+
### 4.2 Example
276
+
277
+
```SQL
278
+
-- Import tsfile by excuting load sql
279
+
IoTDB> load '/home/dump1.tsfile' with ( 'on-success'='none')
Copy file name to clipboardExpand all lines: src/UserGuide/dev-1.3/Tools-System/Data-Import-Tool-1-3-4.md
+47-2Lines changed: 47 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,10 @@
1
1
# Data Import
2
2
3
3
## 1. Overview
4
-
IoTDB supports two methods for data import:
4
+
IoTDB supports three methods for data import:
5
5
* 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.
6
6
* TsFile Auto-Loading Feature
7
+
* Load `TsFile` SQL
7
8
8
9
<tablestyle="text-align: left;">
9
10
<tbody>
@@ -21,13 +22,17 @@ IoTDB supports two methods for data import:
21
22
<td>Can be used for single or batch import of SQL files into IoTDB</td>
22
23
</tr>
23
24
<tr>
24
-
<td rowspan="2">TsFile</td>
25
+
<td rowspan="3">TsFile</td>
25
26
<td>Can be used for single or batch import of TsFile files into IoTDB</td>
26
27
</tr>
27
28
<tr>
28
29
<td>TsFile Auto-Loading Feature</td>
29
30
<td>Can automatically monitor a specified directory for newly generated TsFiles and load them into IoTDB.</td>
30
31
</tr>
32
+
<tr>
33
+
<td>Load SQL</td>
34
+
<td>Can be used for single or batch import of TsFile files into IoTDB</td>
35
+
</tr>
31
36
</tbody>
32
37
</table>
33
38
@@ -242,3 +247,43 @@ Add the following parameters to `iotdb-system.properties` (template: `iotdb-syst
242
247
2. **Restricted Directories**: Do NOT set Pipe receiver directories, data directories, or other system paths as monitored directories.
243
248
3. **Directory Conflicts**: Ensure `load_active_listening_fail_dir` does not overlap with `load_active_listening_dirs` or its subdirectories.
244
249
4. **Permissions**: The monitored directory must have write permissions. Files are deleted after successful loading; insufficient permissions may cause duplicate loading.
250
+
251
+
## 4. Load SQL
252
+
253
+
IoTDB supports importing one or multiple TsFile files containing time series into another running IoTDB instance directly via SQL execution through the CLI.
254
+
255
+
### 4.1 Command
256
+
257
+
```SQL
258
+
load '<path/dir>' with (
259
+
'attribute-key1'='attribute-value1',
260
+
'attribute-key2'='attribute-value2',
261
+
)
262
+
```
263
+
264
+
*`<path/dir>` : The path to a TsFile or a folder containing multiple TsFiles.
265
+
*`<attributes>`: Optional parameters, as described below.
266
+
267
+
| Key | Key Description | Value Type | Value Range | Value is Required | Default Value |
|`database-level`| When the database corresponding to the TsFile does not exist, the database hierarchy level can be specified via the ` database-level` parameter. The default is the level set in `iotdb-common.properties`. For example, setting level=1 means the prefix path of level 1 in all time series in the TsFile will be used as the database. | Integer |`[1: Integer.MAX_VALUE]`| No | 1 |
270
+
|`on-success`| Action for successfully loaded TsFiles: `delete` (delete the TsFile after successful import) or `none` (retain the TsFile in the source folder). | String |`delete / none`| No | delete |
271
+
|`convert-on-type-mismatch`| Whether to perform type conversion during loading if data types in the TsFile mismatch the target schema. | Boolean |`true / false`| No | true |
272
+
|`verify`| Whether to validate the schema before loading the TsFile. | Boolean |`true / false`| No | true |
273
+
|`tablet-conversion-threshold`| Size threshold (in bytes) for converting TsFiles into tablet format during loading. Default: `-1` (no conversion for any TsFile).(Available since v1.3.6) | Integer |`[-1,0 :``Integer.MAX_VALUE]`| No | -1 |
274
+
275
+
### 4.2 Example
276
+
277
+
```SQL
278
+
-- Import tsfile by excuting load sql
279
+
IoTDB> load '/home/dump1.tsfile' with ( 'on-success'='none')
0 commit comments