Modify Table Properties
1. Rename Table
Function: Using the ALTER TABLE command, you can rename an existing table to a new table name.
Syntax:
Example:
2. Modify Table Comments
Function: Using the ALTER TABLE command, you can add or modify comments for external tables.
Syntax:
Example:
After executing the above command, you can use the DESC EXTENDED command to view detailed information about the table, including comments:
3. Modify Table Properties
Function: Using the ALTER TABLE command, you can set or modify properties for an external table. Currently reserved parameters.
Syntax:
Parameters Supported by Tables
The following table lists system properties along with their descriptions and value ranges:
Parameter Name | Description | Value Range |
---|---|---|
data_lifecycle | Data lifecycle | Positive integer greater than 0, a value of -1 indicates that the lifecycle is not enabled |
data_retention_days | Sets the Time Travel retention period, which determines how long you can access historical data, including using UNDROP, TABLE STREAM, and RESTORE to access and recover historical data | You can set different data retention periods for each table to meet different business needs. The range for num is 0-90, and Lakehouse will charge separate storage fees for Time Travel |