Viewing Multi-Versioning Backup Data (Deprecated, Not Recommended)
Function
The multi-versioning feature is to be deprecated and is not recommended. Recommended functions: Hudi multi-versioning cleanup and Hudi archive.
After the multiversion function is enabled, you can run the SHOW HISTORY command to view the backup data of a table. For details about the syntax for enabling or disabling the multiversion function, see Enabling or Disabling Data Multi-Versioning (Deprecated, Not Recommended).
Currently, the multiversion function supports only OBS tables created using the Hive syntax. For details about the syntax for creating a table, see Creating an OBS Table Using the Hive Syntax.
Syntax
- View the backup data of a non-partitioned table.
SHOW HISTORY FOR TABLE [db_name.]table_name;
- View the backup data of a specified partition.
SHOW HISTORY FOR TABLE [db_name.]table_name PARTITION (column = value, ...);
Keywords
- SHOW HISTORY FOR TABLE: Used to view backup data
- PARTITION: Used to specify the partition column
Parameters
Parameter |
Description |
---|---|
db_name |
Database name, which consists of letters, digits, and underscores (_). The value cannot contain only digits or start with a digit or underscore (_). |
table_name |
Table name |
column |
Partition column name |
value |
Value corresponding to the partition column name |
Precautions
Currently, the multiversion function supports only OBS tables created using the Hive syntax. For details about the syntax for creating a table, see Creating an OBS Table Using the Hive Syntax.
Example
- View multiversion backup data of the test_table table.
1
SHOW HISTORY FOR TABLE test_table;
- View multiversion backup data of the dt partition in the test_table partitioned table.
1
SHOW HISTORY FOR TABLE test_table PARTITION (dt='2021-07-27');
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot