Support Questions

Find answers, ask questions, and share your expertise

SemanticException Line 1:23 Invalid path ''/user/maria_dev/timesheet.csv'': No files matching path file:/user/maria_dev/timesheet.csv

avatar

I am loading file in hive, using this query & getting above error.

LOAD DATA LOCAL INPATH '/user/maria_dev/timesheet.csv' OVERWRITE INTO TABLE practice;

1 ACCEPTED SOLUTION

avatar
@Mahendra Malpute

Check the permissions on the folder.

The user that is running the query should have access to the folder/file.

Permission can be hive:hdfs if you are running as hive.

Easy way to test is:

sudo su hive

head user/maria_dev/timesheet.csv

Also you can test it out by placing the file in the /tmp folder and giving it read permission.

Thanks

View solution in original post

3 REPLIES 3

avatar
@Mahendra Malpute

Check the permissions on the folder.

The user that is running the query should have access to the folder/file.

Permission can be hive:hdfs if you are running as hive.

Easy way to test is:

sudo su hive

head user/maria_dev/timesheet.csv

Also you can test it out by placing the file in the /tmp folder and giving it read permission.

Thanks

avatar

I checked that there is access issue. Then how can give access to hive user ?

avatar

@Mahendra Malpute

You can use

chmod -R 755 /user/maria_dev

And if you do not want to open up permission on the maria_dev folder,

You can either place the file on /tmp with 755 permission or create another directory that is owned by hive:hdfs and place your file there.

Another option is placing the file under /user/hive which anyways has the permission.