AnalyticDB for MySQL supports the MSCK REPAIR TABLE statement to sync the partitions of OSS external tables.
Prerequisites
The kernel version of the cluster must be 3.1.8.0 or later.
To view and update the minor version of an AnalyticDB for MySQL cluster, log on to the AnalyticDB for MySQL console and go to the Configuration Information section of the Cluster Information page.
Usage notes
This syntax applies only to partitions of OSS external tables. It does not apply to internal tables of AnalyticDB for MySQL.
Syntax
MSCK REPAIR TABLE table_name [SYNC_DIR 'Location'];Parameters
Parameter | Description |
| The name of the external table. |
| Synchronizes the specified partition. If you do not specify this parameter, the entire table is synchronized. |
Examples
Sync all partitions of a table.
MSCK REPAIR TABLE adb_external_db.partition_table_test;Sync a specific partition.
MSCK REPAIR TABLE adb_external_db.partition_table_test SYNC_DIR 'oss://testBucketName/test_db/partition_table_test/dt=20220619';