Getting error while loading data into hive table

0 votes

I am facing issues with hive table. I have created a database:

create database airport;
use airport;
create table airports_mod(airport_id INT,name string,city string,country string,iata string,icao string,latitude double,longitude double,altitude double,timezone timestamp,DST string,tz string) ROW FORMAT DELIMITED FIELDS TERMINATED BY "," STORED AS TEXTFILE;

All this works fine but when I run the below command, I get error:

load data inpath "/home/hduser/airdatasets/airports_mod.dat" into table airports_mod;
FAILED: SemanticException Line 1:17 Invalid path ""/home/hduser/airdatasets/airports_mod.dat"": No files matching path hdfs://localhost:8020/home/hduser/Airdatasets/airports_mod.dat
Jan 30 in Big Data Hadoop by Juvi
77 views

Do you have that file in the mentioned path? If yes, please re-check the path.

Yes, I checked. It is correct. Still getting error

Could you please share the output of the following commands?

$ ls /home/hduser

$ ls /home/hduser/airdatasets
$ ls /home/hduser
Airdatasets

$ ls /home/hduser/airdatasets

It says no file or directory found

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

In the command you have used, the path is /home/hduser/airdatasets/

There is no such directory. The directory name is Airdatasets but you have used airdatasets. Directories are case-sensitive. You have to use the exact same name. Try this path, it should work:

/home/hduser/Airdatasets/airports_mod.dat

answered Jan 30 by Omkar
• 66,880 points
Well, this is embarrassing! Such a silly mistake! Thanks, it worked

Related Questions In Big Data Hadoop

+3 votes
1 answer

Getting Connection Error while loading data into table using cloudera hive

Hey Nafeesa, Itseems that Hive is not able ...READ MORE

answered Oct 3, 2018 in Big Data Hadoop by Vardhan
• 10,980 points
49 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
• 66,880 points
187 views
0 votes
1 answer

Error while creating Hive Database table

In your error, it says that the ...READ MORE

answered Jan 8 in Big Data Hadoop by Omkar
• 66,880 points
47 views
+1 vote
1 answer
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,310 points
1,818 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,310 points
150 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
8,996 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
646 views
0 votes
1 answer

Hadoop Hive: How to skip the first line of csv while loading in hive table?

You can try this: CREATE TABLE temp ...READ MORE

answered Nov 8, 2018 in Big Data Hadoop by Omkar
• 66,880 points
439 views
0 votes
1 answer

Getting some warning/error while loading java file using Hbase commands

In your code, you have set some ...READ MORE

answered Dec 14, 2018 in Big Data Hadoop by Omkar
• 66,880 points
49 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.