Table Lifecycle and Performance Management for IoT Data
Scénario de test & Cas d'usage
Business Context
An administrator is managing a CAS environment that processes large volumes of IoT sensor data. A daily raw table needs to be processed, its columns reordered for query efficiency, and its lifecycle managed to prevent it from consuming memory indefinitely.
Reorder the columns to place identifiers and timestamps first, which is a common pattern for improving query performance in time-series data. Also rename the table.
Set the table's lifetime to 3600 seconds (1 hour) to ensure automatic cleanup after processing. Also, define the redistribution policy for cluster elasticity.
The table 'iot_processed_temp' should have its columns physically reordered in the metadata as specified. The table's properties should show a lifetime of 3600 seconds, meaning it will be dropped from memory one hour after its last access. The redistribution policy should be set to 'REBALANCE'.