Re: Partition deletion w/out using a literal partition value

2012-02-05 Thread Evan Pollan
-0600 To: "user@hive.apache.org<mailto:user@hive.apache.org>" mailto:user@hive.apache.org>> Subject: Re: Partition deletion w/out using a literal partition value Hive 0.8.0 has metadata optimizations ([HIVE-1003]<https://issues.apache.org/jira/browse/HIVE-1003>), but y

Re: Partition deletion w/out using a literal partition value

2012-02-05 Thread Matt Tucker
Hive 0.8.0 has metadata optimizations ([HIVE-1003]), but your best bet is to write a shell script that executes 'show partitions ;', and then loop through the results and drop any partitions that meet your criteria. You can then create a cron job to

Partition deletion w/out using a literal partition value

2012-02-05 Thread Evan Pollan
I have an environment where I'm partitioning data in some hive tables by day. I'd like to be able to delete data that's older than 1 week in some tables and 1 month in others. It appears that ALTER TABLE DROP PARTITION only supports a partition spec that equates a partition with a literal val