I have an employee data with 3 departments A,B,C. I am trying to create partioned table on departments. I created the table using below command.
create external table Parti_Trail (EmployeeID Int,FirstName String,Designation String,Salary Int) PARTITIONED BY (Department String) row format delimited fields terminated by "," location '/user/sree/HiveTrail';
But this did nt load my table with data in location '/user/sree/HiveTrail'
So I tried to load my table
LOAD DATA INPATH '/user/aibladmin/HiveTrail' OVERWRITE INTO TABLE Parti_SCDTrail PARTITION(department);
But showing
FAILED: SemanticException org.apache.hadoop.hive.ql.metadata.HiveException: department not found in table's partition spec: {department=null}
- Why is it so. Am I doing anything wrong?
- What happens if we
SET hive.exec.dynamic.partition.mode = nonstrict;
- While creating partitioned table , do we need to keep data seperated in different folder or whether it automatically get seperated into different partitions