EXPORT METADATA
Description
The EXPORT METADATA syntax is used to export cluster metadata in JSON format.
Syntax
ExportMetaData ::=
'EXPORT' 'METADATA' ('TO' 'FILE' filePath)?
filePath ::=
stringReturn Value Description
| Columns | Description |
|---|---|
| id | current compute node id |
| create_time | export time |
| cluster_info | exported metadata (or success message when TO FILE is set) |
Supplement
- When
filePathis not specified, thecluster_infocolumn returns Base64-encoded metadata; - When
filePathis specified, metadata is written to file andcluster_inforeturns a success message; - The parent directory of
filePathwill be created automatically if needed, and existing file content will be overwritten.
Example
EXPORT METADATA;EXPORT METADATA TO FILE '/tmp/metadata.json';Reserved word
EXPORT, METADATA, TO, FILE