Not able to insert in hive partition table

0 votes

I have created a hive partition table and i check whether it was created properly or not using the description command. I have verified that it was properly created. 

Now I am trying to insert data in the hive partitioned table using the following command:

insert into table partition_table partition(sex='Male')select eid ,name ,age from employee where sex ='Male';

But I am getting this error:

FAILED: SemanticException [Error 10006]: Line 1:44 Partition not found ''Male''
Dec 14, 2018 in Big Data Hadoop by slayer
• 29,170 points
310 views

1 answer to this question.

0 votes

You have to add the partition before you can use it:

ALTER TABLE partition_table ADD PARTITION( sex= 'Male' );
insert into table partition_table partition(sex='Male') select eid ,name ,age from employee where sex ='Male';
answered Dec 14, 2018 by Omkar
• 67,600 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Not able to create Hive table from HDFS file

You dont have to specify the file name ...READ MORE

answered Dec 5, 2018 in Big Data Hadoop by Omkar
• 67,600 points
307 views
0 votes
1 answer

Command to partition table in Hive

Yes, You need to mention the below ...READ MORE

answered Dec 17, 2018 in Big Data Hadoop by Omkar
• 67,600 points
75 views
0 votes
1 answer

Hive table not able to use row format serde

Try this: create table books(isbn string, book_title string, ...READ MORE

answered Dec 31, 2018 in Big Data Hadoop by Omkar
• 67,600 points
57 views
0 votes
1 answer

Not able to create database in HIVE

The namenode is in safemode which is ...READ MORE

answered May 24 in Big Data Hadoop by Sunny
32 views
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,690 points
3,068 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,690 points
342 views
0 votes
10 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
15,106 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,260 points
1,124 views
0 votes
1 answer

Not able to insert data into hive table

Seems like a hive version problem.​ insert operation is ...READ MORE

answered Dec 14, 2018 in Big Data Hadoop by Omkar
• 67,600 points
305 views
0 votes
1 answer

Hadoop Hive: How to insert data in Hive table?

First, copy data into HDFS. Then create ...READ MORE

answered Nov 12, 2018 in Big Data Hadoop by Omkar
• 67,600 points
1,089 views