I have a Hive Table with 2 columns.Employee ID and Salary.
Data is something like given below.
Employee ID Salary
1 10000.08
2 20078.67
3 20056.45
4 30000.76
5 10045.14
6 43567.76
I want to create Partitions based on Salary Column.For Example Partition for salary range 10000 to 20000, 20001 to 30000.
How do i achieve this.
Hive does not support range partitioning, but you can calculate ranges during data load.
Create table partitioned by salary_range:
insert using case for salary range calculation: