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 31, 2019 in Big Data Hadoop by Juvi
3,388 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 31, 2019 by Omkar
• 69,220 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 4, 2018 in Big Data Hadoop by Vardhan
• 13,150 points
1,014 views
0 votes
1 answer

Error while Loading data to Hive.

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

answered Jul 29, 2019 in Big Data Hadoop by Quill
1,281 views
0 votes
0 answers
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
• 69,220 points
3,226 views
+1 vote
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
• 11,380 points
11,071 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
• 11,380 points
2,569 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
109,025 views
–1 vote
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,350 points
4,635 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
• 69,220 points
8,985 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
• 69,220 points
874 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP