I have dropped the all the partitions in the hive table by using the alter command
alter table emp drop partition (hiredate>'0');
After droping partitions still I can see the partitions metadata.How to delete this partition metadata? Can I use the same table for new partitions?
Partitioning is defined when the table is created. By running
ALTER TABLE ... DROP PARTITION ...
you are only deleting the data and metadata for the matching partitions, not the partitioning of the table itself.Your best bet at this point will be to recreate the table without the partitioning. If there is some data you are trying to save, rename the current table, create the new table (without the partitioning), then run an
INSERT
from the old table to the new table.