I have partition table called employee_part.This table is partitioned by hiredate. It has metadata as given below
When I tried to add new column partition to the employee_part table Im getting an error saying
ALTER TABLE employee_part ADD PARTITION (gender='M') location 'hdfs://user/hive/warehouse/maprpoc.db/employee_part/hiredate=1985-11-21';
FAILED: SemanticException Partition spec {gender=M} contains non-partition columns
Please clarify on this! Thanks in advance..
That is because you have partitioned data on hiredate, but trying add partition on gender column.
Create partition on hiredate i.e.