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
| 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 |
-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 | - |
# 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]
# Export metadata under the root.ln path ./export-schema.sh -t /home/ -path "root.ln.**"
# Export result format Timeseries,Alias,DataType,Encoding,Compression root.ln.wf02.wt02.status,,BOOLEAN,RLE,LZ4 root.ln.wf02.wt02.hardware,,TEXT,PLAIN,LZ4