All Products
Search
Document Center

Data Lake Analytics - Deprecated:MSCK REPAIR TABLE

更新時間:Apr 23, 2019

Synchronize the partition information of the OSS data source to the metadata

Syntax

  1. MSCK REPAIR TABLE table_name

Example

SHOW PARTITIONS primitives_parquet_p does not display partition information before you run the MSCK REPAIR TABLE command.

  1. mysql> show partitions primitives_parquet_p;
  2. +--------+
  3. | Result |
  4. +--------+
  5. | |
  6. +--------+
  7. 1 row in set (0.85 sec)

After you run the MSCK REPAIR TABLE command, the partition information is displayed:

  1. mysql> msck repair table primitives_parquet_p;
  2. +--------+
  3. | Result |
  4. +--------+
  5. | NULL |
  6. +--------+
  7. 1 row in set (0.94 sec)
  8. mysql> show partitions primitives_parquet_p;
  9. +--------------------------------------------------------------------------+
  10. | Result |
  11. +--------------------------------------------------------------------------+
  12. | year=2009/month=1
  13. year=2009/month=2
  14. year=2009/month=3
  15. year=2009/month=4
  16. |
  17. +--------------------------------------------------------------------------+
  18. 1 row in set (0.33 sec)