This section describes how to modify the lifecycle of an existing partitioned or non-partitioned table.
When the lifecycle function is enabled for the first time, the system scans tables or partitions, scans table data files in the path, and updates LAST_ACCESS_TIME of tables or partitions. The time required depends on the number of partitions and files.
ALTER TABLE table_name SET TBLPROPERTIES("dli.lifecycle.days"='N')
TBLPROPERTIES: Table properties, which can be used to extend the lifecycle of a table.
Parameter |
Mandatory |
Description |
---|---|---|
table_name |
Yes |
Name of the table whose lifecycle needs to be modified |
dli.lifecycle.days |
Yes |
Lifecycle duration after the modification. The value must be a positive integer, in days. |
alter table test_lifecycle_exists SET TBLPROPERTIES("dli.lifecycle.days"='50');
alter table test_lifecycle_exists SET TBLPROPERTIES( "dli.lifecycle.days"='50', "dli.table.lifecycle.status"='enable' );