Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions src/.vuepress/sidebar/V1.3.x/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,22 @@ export const enSidebar = {
{ text: 'Monitor Tool', link: 'Monitor-Tool_apache' },
{ text: 'Benchmark Tool', link: 'Benchmark' },
{ text: 'Cluster Management Tool', link: 'Maintenance-Tool_apache' },
{ 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 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: 'Data Import & Export', collapsible: true,
children: [
{ 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 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: 'Schema Import & Export', collapsible: true,
children: [
{ text: 'Schema Import', link: 'Schema-Import-Tool' },
{ text: 'Schema Export', link: 'Schema-Export-Tool' },
],
},
{ text: 'Full Backup Tool(V1.3.2)', link: 'Backup-Tool' },
{ text: 'Health Check Tool(V1.3.2)', link: 'Health-Check-Tool' },
],
Expand Down
22 changes: 16 additions & 6 deletions src/.vuepress/sidebar/V1.3.x/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,22 @@ export const zhSidebar = {
{ text: '监控工具', link: 'Monitor-Tool_apache' },
{ text: '测试工具', link: 'Benchmark' },
{ text: '集群管理工具', link: 'Maintenance-Tool_apache' },
{ 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.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: '数据导入导出', collapsible: true,
children: [
{ 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.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: '元数据导入导出', collapsible: true,
children: [
{ text: '元数据导入', link: 'Schema-Import-Tool' },
{ text: '元数据导出', link: 'Schema-Export-Tool' },
],
},
{ text: '全量备份工具(V1.3.2)', link: 'Backup-Tool' },
{ text: '健康检查工具(V1.3.2)', link: 'Health-Check-Tool' },
],
Expand Down
22 changes: 16 additions & 6 deletions src/.vuepress/sidebar_timecho/V1.3.x/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,22 @@ export const enSidebar = {
{ text: 'Monitor Tool', link: 'Monitor-Tool_timecho' },
{ text: 'Benchmark Tool', link: 'Benchmark' },
{ text: 'Cluster Management Tool', link: 'Maintenance-Tool_timecho' },
{ 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 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: 'Data Import & Export', collapsible: true,
children: [
{ 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 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: 'Schema Import & Export', collapsible: true,
children: [
{ text: 'Schema Import', link: 'Schema-Import-Tool' },
{ text: 'Schema Export', link: 'Schema-Export-Tool' },
],
},
{ text: 'Full Backup Tool(V1.3.2)', link: 'Backup-Tool' },
{ text: 'Health Check Tool(V1.3.2)', link: 'Health-Check-Tool' },
],
Expand Down
22 changes: 16 additions & 6 deletions src/.vuepress/sidebar_timecho/V1.3.x/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,22 @@ export const zhSidebar = {
{ text: '监控工具', link: 'Monitor-Tool_timecho' },
{ text: '测试工具', link: 'Benchmark' },
{ text: '集群管理工具', link: 'Maintenance-Tool_timecho' },
{ 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.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: '数据导入导出', collapsible: true,
children: [
{ 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.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: '元数据导入导出', collapsible: true,
children: [
{ text: '元数据导入', link: 'Schema-Import-Tool' },
{ text: '元数据导出', link: 'Schema-Export-Tool' },
],
},
{ text: '全量备份工具(V1.3.2)', link: 'Backup-Tool' },
{ text: '健康检查工具(V1.3.2)', link: 'Health-Check-Tool' },
],
Expand Down
72 changes: 72 additions & 0 deletions src/UserGuide/V1.3.x/Tools-System/Schema-Export-Tool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<!--

Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.

-->
# Metadata Export

## 1. Overview

The metadata export tool `export-schema.sh/bat` is located in the `tools` directory. It can export metadata from a specified database in IoTDB into CSV files.

> Supported since version 1.3.3

## 2. Detailed Functionality

### 2.1 Parameter Description

| Short Parameter | Full Parameter | Description | Required | Default Value |
|-----------------|----------------|-------------|----------|---------------|
| `-h` | `--host` | Hostname | No | 127.0.0.1 |
| `-p` | `--port` | Port number | No | 6667 |
| `-u` | `--username` | Username | No | root |
| `-pw` | `--password` | Password. Hidden input is supported since V2.0.9-beta | No | root |
| `-t` | `--target` | Specifies the target directory for output files. The directory will be created if it does not exist | Yes | - |
| `-path` | `--path_pattern` | Specifies the path pattern for metadata export | Yes | - |
| `-pf` | `--path_pattern_file` | Specifies the name of the export file | No | - |
| `-lpf` | `--lines_per_file` | Specifies the maximum number of lines per exported dump file | No | `10000` |
| `-timeout` | `--queryTimeout` | Query timeout for the session (ms) | No | -1. Range: -1 ~ Long.MAX_VALUE = 9223372036854775807 |
| `-help` | `--help` | Displays help information | No | - |

### 2.2 Execution Commands

```Bash
# Unix/OS X
> tools/export-schema.sh [-h <host>] [-p <port>] [-u <username>] [-pw <password>] -t <targetDir>
[-path <exportPathPattern>] [-pf <exportPathPatternFile>] [-lpf <linesPerFile>]
[-timeout <timeout>] [-help]

# Windows
> tools\export-schema.bat [-h <host>] [-p <port>] [-u <username>] [-pw <password>] -t <targetDir>
[-path <exportPathPattern>] [-pf <exportPathPatternFile>] [-lpf <linesPerFile>]
[-timeout <timeout>] [-help]
```

### 2.3 Usage Example

```Bash
# Export metadata under the root.ln path
./export-schema.sh -t /home/ -path "root.ln.**"
```

```CSV
# Export result format
Timeseries,Alias,DataType,Encoding,Compression
root.ln.wf02.wt02.status,,BOOLEAN,RLE,LZ4
root.ln.wf02.wt02.hardware,,TEXT,PLAIN,LZ4
```
82 changes: 82 additions & 0 deletions src/UserGuide/V1.3.x/Tools-System/Schema-Import-Tool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<!--

Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.

-->

# Metadata Import

## 1. Overview

The metadata import tool `import-schema.sh/bat` is located in the `tools` directory. It can import CSV files containing metadata creation statements from a specified path into IoTDB.

> Supported since version 1.3.3

## 2. Detailed Functionality

### 2.1 Parameter Description

| Short Parameter | Full Parameter | Description | Required | Default Value |
|-----------------|----------------|-------------|----------|---------------|
| `-h` | `--host` | Hostname | No | 127.0.0.1 |
| `-p` | `--port` | Port number | No | 6667 |
| `-u` | `--username` | Username | No | root |
| `-pw` | `--password` | Password | No | root |
| `-s` | `--source` | Local path of the script file or directory to be loaded | Yes | - |
| `-fd` | `--fail_dir` | Specifies the directory to save failed files | No | - |
| `-lpf` | `--lines_per_failed_file` | Specifies the maximum number of lines per failed file | No | 100000. Range: 0 ~ Integer.MAX_VALUE = 2147483647 |
| `-help` | `--help` | Displays help information | No | - |

### 2.2 Execution Commands

```Bash
# Unix/OS X
tools/import-schema.sh [-h <host>] [-p <port>] [-u <username>] [-pw <password>] -s
<sourceDir/sourceFile> [-fd <failDir>] [-batch <batchSize>] [-lpf <linesPerFile>] [-help]

# Windows
tools\import-schema.bat [-h <host>] [-p <port>] [-u <username>] [-pw <password>] -s
<sourceDir/sourceFile> [-fd <failDir>] [-batch <batchSize>] [-lpf <linesPerFile>] [-help]
```

### 2.3 Usage Example

```SQL
-- Before import
IoTDB> show timeseries root.ln.**
+----------+-----+--------+--------+--------+-----------+----+----------+--------+------------------+--------+
|Timeseries|Alias|Database|DataType|Encoding|Compression|Tags|Attributes|Deadband|DeadbandParameters|ViewType|
+----------+-----+--------+--------+--------+-----------+----+----------+--------+------------------+--------+
+----------+-----+--------+--------+--------+-----------+----+----------+--------+------------------+--------+
```

```Bash
# Execute the import command
./import-schema.sh -s /home/dump0_0.csv
```

```SQL
-- Verify after successful import
IoTDB> show timeseries root.ln.**
+--------------------------+-----+--------+--------+--------+-----------+----+----------+--------+------------------+--------+
| Timeseries|Alias|Database|DataType|Encoding|Compression|Tags|Attributes|Deadband|DeadbandParameters|ViewType|
+--------------------------+-----+--------+--------+--------+-----------+----+----------+--------+------------------+--------+
| root.ln.wf02.wt02.status| null| root.ln| BOOLEAN| RLE| LZ4|null| null| null| null| BASE|
|root.ln.wf02.wt02.hardware| null| root.ln| TEXT| PLAIN| LZ4|null| null| null| null| BASE|
+--------------------------+-----+--------+--------+--------+-----------+----+----------+--------+------------------+--------+
```
72 changes: 72 additions & 0 deletions src/UserGuide/dev-1.3/Tools-System/Schema-Export-Tool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<!--

Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.

-->
# Metadata Export

## 1. Overview

The metadata export tool `export-schema.sh/bat` is located in the `tools` directory. It can export metadata from a specified database in IoTDB into CSV files.

> Supported since version 1.3.3

## 2. Detailed Functionality

### 2.1 Parameter Description

| Short Parameter | Full Parameter | Description | Required | Default Value |
|-----------------|----------------|-------------|----------|---------------|
| `-h` | `--host` | Hostname | No | 127.0.0.1 |
| `-p` | `--port` | Port number | No | 6667 |
| `-u` | `--username` | Username | No | root |
| `-pw` | `--password` | Password. Hidden input is supported since V2.0.9-beta | No | root |
| `-t` | `--target` | Specifies the target directory for output files. The directory will be created if it does not exist | Yes | - |
| `-path` | `--path_pattern` | Specifies the path pattern for metadata export | Yes | - |
| `-pf` | `--path_pattern_file` | Specifies the name of the export file | No | - |
| `-lpf` | `--lines_per_file` | Specifies the maximum number of lines per exported dump file | No | `10000` |
| `-timeout` | `--queryTimeout` | Query timeout for the session (ms) | No | -1. Range: -1 ~ Long.MAX_VALUE = 9223372036854775807 |
| `-help` | `--help` | Displays help information | No | - |

### 2.2 Execution Commands

```Bash
# Unix/OS X
> tools/export-schema.sh [-h <host>] [-p <port>] [-u <username>] [-pw <password>] -t <targetDir>
[-path <exportPathPattern>] [-pf <exportPathPatternFile>] [-lpf <linesPerFile>]
[-timeout <timeout>] [-help]

# Windows
> tools\export-schema.bat [-h <host>] [-p <port>] [-u <username>] [-pw <password>] -t <targetDir>
[-path <exportPathPattern>] [-pf <exportPathPatternFile>] [-lpf <linesPerFile>]
[-timeout <timeout>] [-help]
```

### 2.3 Usage Example

```Bash
# Export metadata under the root.ln path
./export-schema.sh -t /home/ -path "root.ln.**"
```

```CSV
# Export result format
Timeseries,Alias,DataType,Encoding,Compression
root.ln.wf02.wt02.status,,BOOLEAN,RLE,LZ4
root.ln.wf02.wt02.hardware,,TEXT,PLAIN,LZ4
```
Loading
Loading