Member since
04-26-2019
1
Post
0
Kudos Received
0
Solutions
04-27-2019
03:55 PM
To drop partitions with a Range filter, use below syntax. (CDH 5.7, Hive 1.1.0). ALTER TABLE tableName DROP PARTITION (date >='20190410', date <='20190415'); Example: Before: +-----------------------+--+ | partition | +-----------------------+--+ | date=20190401 | | date=20190402 | | date=20190403 | | date=20190404 | | date=20190405 | | date=20190406 | | date=20190410 | | date=20190411 | +-----------------------+--+ ALTER TABLE tableName DROP PARTITION (date >='20190410', date <='20190415'); AFTER: +-----------------------+--+ | partition | +-----------------------+--+ | date=20190401 | | date=20190402 | | date=20190403 | | date=20190404 | | date=20190405 | | date=20190406 | +-----------------------+--+
... View more