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
157 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.

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
• 67,290 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
• 12,230 points
65 views
0 votes
1 answer

Error while Loading data to Hive.

Your data node is not running that ...READ MORE

answered Jul 29 in Big Data Hadoop by Quill
19 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,290 points
253 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
• 67,290 points
105 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,510 points
2,392 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,510 points
244 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
12,191 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,240 points
896 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
• 67,290 points
706 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
• 67,290 points
66 views