Support Questions

Find answers, ask questions, and share your expertise

Load data local inpath is not working for beeline.

avatar
Rising Star

hi Guys.

I am trying to load data files into my hive table and facing issue. if files are located on local it doesn't work. if I move the file to hdfs then it works without any issue.

Following command is not working in beeline, however it works perfectly in hive

load data local inpath '/home/gaurang.shah/test.json' into table temp.test;
  • Data is located on the node where one of the instance of hiverserver2 is running.
  • I have given it all the permission as well.
[gaurang.shah@aa ~] pwd
/home/gaurang.shah
[gaurang.shah@aa ~]$ ll test.json
-rwxrwxrwx 1 gaurang.shah domain users 56 Jul 11 13:54 test.json
2 REPLIES 2

avatar

Could you also share the error that follows the load data local inpath command? Ex do you see something like "invalid path Local path" or is there any error complaining about permissions?

Are you connecting to the hiveserver2 via zookeeper?

avatar

Hi @Gaurang Shah!
Did you try to execute beeline with your user?

beeline -u 'jdbc:hive2://HS2_SERVER:10000/default' -n gaurang.shah
!sh ls -lh /home/gaurang.shah/

Hope this helps