DLI controls multiple versions of backup data for restoration. After the multiversion function is enabled, the system automatically backs up table data when you delete or modify the data using insert overwrite or truncate, and retains the data for a certain period. You can quickly restore data within the retention period. For details about the syntax related to the multiversion function, see Backing Up and Restoring Data of Multiple Versions.
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.
ALTER TABLE [db_name.]table_name SET TBLPROPERTIES ("dli.multi.version.enable"="true");
1 2 | ALTER TABLE [db_name.]table_name UNSET TBLPROPERTIES ("dli.multi.version.enable"); |
RESTORE TABLE [db_name.]table_name TO initial layout;
Parameter |
Description |
---|---|
db_name |
Database name that contains letters, digits, and underscores (_). It cannot contain only digits or start with an underscore (_). |
table_name |
Table name |
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.
1 2 | ALTER TABLE test_table SET TBLPROPERTIES ("dli.multi.version.enable"="true"); |
1 2 | ALTER TABLE test_table UNSET TBLPROPERTIES ("dli.multi.version.enable"); |
RESTORE TABLE test_table TO initial layout;