Not able to insert data into hive table

0 votes

I am trying to insert data in hive table using this command:

insert into test_table values(1,'xyz');

But I am getting this error:

Dec 14, 2018 in Big Data Hadoop by slayer
• 29,040 points
195 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Seems like a hive version problem.​ insert operation is supported from hive 0.14 version onwards. Maybe you are using a lower version of hive. You can try below command to insert the data in your table,

hive>load data local inpath 'input_file' into table test_table;
answered Dec 14, 2018 by Omkar
• 66,990 points
So will this command also update my version?? plz respond...

Hey @chaitanya_narala. The command mentioned in the answer does not update the hive version. 

The command

load data local inpath 'input_file' into table test_table;

is just a command used to insert data into Hive table for Hive version lower than 0.14.

For Hive version from 0.14 onwards, the command used to insert data into the table was changed:

insert into test_table values(1,'xyz');

Related Questions In Big Data Hadoop

0 votes
1 answer

Hadoop Hive Hbase: How to insert data into Hbase using Hive (JSON file)?

You can use the get_json_object function to parse the ...READ MORE

answered Nov 15, 2018 in Big Data Hadoop by Omkar
• 66,990 points
339 views
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
• 66,990 points
99 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
• 66,990 points
42 views
0 votes
1 answer

Not able to run Hive queries.

Try bin/hive -e 'LOAD DATA INPATH kv1.txt OVERWRITE ...READ MORE

answered Aug 30, 2018 in Big Data Hadoop by Frankie
• 9,710 points
113 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
• 9,570 points
1,866 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
• 9,570 points
164 views
0 votes
10 answers

hadoop fs -put command?

copy command can be used to copy files ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Sujay
9,304 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
674 views
0 votes
1 answer

Not able to insert in hive partition table

You have to add the partition before ...READ MORE

answered Dec 14, 2018 in Big Data Hadoop by Omkar
• 66,990 points
120 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
• 66,990 points
158 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.