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 #

copySHOW TABLE METADATA tableName [, tableName] 

Parameter Explanation

None

Example

copySHOW TABLE METADATA t_order;

2. Refresh Table Metadata #

copyREFRESH TABLE METADATA

Example

Refresh metadata for all tables

copyREFRESH TABLE METADATA

Refresh metadata for specified table

copyREFRESH TABLE METADATA t_order

Refresh metadata for specified table in specified data source

copyREFRESH 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

copyREFRESH TABLE METADATA FROM STORAGE UNIT ds_1 SCHEMA db_schema

3. Refresh metadata for specified database #

copyREFRESH DATABASE METADATA schemaName FROM GOVERNANCE CENTER

Example

copyREFRESH 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 #

copyIMPORT DATABASE CONFIGURATION

Example

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

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

copyEXPORT DATABASE CONFIGURATION

Example

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