Logo
Metadata

Metadata #

SyntaxDescriptionType
SHOW TABLE METADATA tableName [, tableName] …Query table metadataRQL
REFRESH TABLE METADATARefresh table metadataRUL
REFRESH DATABASE METADATA schemaName FROM GOVERNANCE CENTERRefresh specified logical database metadataRUL
IMPORT DATABASE CONFIGURATIONImport the configuration in YAML into the database, and only support the import operation for empty databasesRUL
EXPORT DATABASE CONFIGURATIONExport the data source and rule configuration in the database to YAML formatRUL

1. Query Table Metadata #

SHOW TABLE METADATA tableName [, tableName] 

Parameter Explanation

None

Example

SHOW TABLE METADATA t_order;

2. Refresh Table Metadata #

REFRESH TABLE METADATA

Example

Refresh metadata for all tables

REFRESH TABLE METADATA

Refresh metadata for specified table

REFRESH TABLE METADATA t_order

Refresh metadata for specified table in specified data source

REFRESH TABLE METADATA t_order FROM STORAGE UNIT ds_1

Refresh metadata for specified table in specified schema, if there is no table in the schema,the schema will be deleted

REFRESH TABLE METADATA FROM STORAGE UNIT ds_1 SCHEMA db_schema

3. Refresh metadata for specified database #

REFRESH DATABASE METADATA schemaName FROM GOVERNANCE CENTER

Example

REFRESH DATABASE METADATA sharding_db FROM GOVERNANCE CENTER;

4. Import The Configuration In YAML Into The Database, And Only Support The Import Operation For Empty Databases #

IMPORT DATABASE CONFIGURATION

Example

IMPORT DATABASE CONFIGURATION FROM FILE "/xx x/config‑sharding.yaml";

5. Export The Data Source And Rule Configuration In The Database To YAML Format #

EXPORT DATABASE CONFIGURATION

Example

EXPORT DATABASE CONFIGURATION TO FILE "/xxx/config‑sharding.yaml";