I want to create a simple hive partitioned table and have a sqoop import command to populate it.
1.Table have say 4 columns, ID, col1, col2, col3.
One of the column say col2 is int type and contains values 1 to 10 only.
I need to partition table based on col2 column with 1 to 5 value data should be in one partition and rest in another.
I am currently trying this which doesnt work: Alter table tblname add partition (col2=1,col2=2,col2=3,col2=4,col2=5) location 'Part1';
- Once done i need to populate this table with sqoop import from my sql server.
I have tried many ways but not able to do it. Can anyone please help?