i have created a non partitioned table and load data into the table,now i want to add a PARTITION
on the basis of department into that table,can I do this?
If I do:
ALTER TABLE Student ADD PARTITION (dept='CSE') location '/test';
It gives me error:
FAILED: SemanticException table is not partitioned but partition spec exists: {dept=CSE}
please help. Thanks
First create a table in such a way so that you don't have partition column in the table.
Once you are done with the creation of the table then alter the table to add the partition department wise like this :
I hope this will help.