IMPORT DATABASE CONFIGURATION

Description

The IMPORT DATABASE CONFIGURATION syntax is used to import YAML configuration to specified database.

Syntax

Grammar Railroad diagram

  1. ExportDatabaseConfiguration ::=
  2. 'IMPORT' 'DATABASE' 'CONFIGURATION' 'FROM' 'FILE' filePath ('TO' databaseName)?
  3. databaseName ::=
  4. identifier
  5. filePath ::=
  6. string

Supplement

  • When databaseName is not specified, the default is the currently used DATABASE. If DATABASE is not used, No database selected will be prompted.

  • The IMPORT DATABASE CONFIGURATION syntax only supports import operations on empty database.

Example

  • Import the configuration in YAML into the specified database
  1. IMPORT DATABASE CONFIGURATION FROM FILE "/xxx/config_sharding_db.yaml" TO sharding_db;
  • Import the configuration in YAML into the current database
  1. IMPORT DATABASE CONFIGURATION FROM FILE "/xxx/config_sharding_db.yaml";

Reserved word

IMPORT, DATABASE, CONFIGURATION, FROM, FILE, TO