Vijju
Vijju

Reputation: 37

Add retention period to hive tables

Could you please let me know how to add retention period to Hive tables. In the below URL I could see partition discovery and retention is not recommended for use on managed tables. I don't understand why it is not recommended.

  1. I have created a table added below properties to the table schema.
  2. Just to be sure I have ran the command MSCK REPAIR TABLE table_name SYNC PARTITIONS
  3. I have inserted the data into the table. As per the retention period, the partitions should be dropped after 30 minutes but nothing was dropped. Am I missing something here? Thank you in advance for your help
'auto.purge'='true',                                                                    'discover.partitions'='true',                                                                                                          
'partition.retention.period'='30m',

https://docs.cloudera.com/HDPDocuments/HDP3/HDP-3.1.0/using-hiveql/content/hive-manage-partitions.html

Upvotes: 0

Views: 854

Answers (0)

Related Questions