Error loading csv data into Hive table

Teja Nandury picture Teja Nandury · Oct 23, 2014 · Viewed 18.5k times · Source

i have a csv file in hadoop and i have a Hive table ,now i want to laoad that csv file into this Hive table

i have used load LOAD DATA local 'path/to/csv/file' overwrite INTO TABLE tablename;

ended up with this error :

Error in .verify.JDBC.result(r, "Unable to retrieve JDBC result set for ",  : 
Unable to retrieve JDBC result set for LOAD DATA local
'path/to/csv/file' overwrite INTO TABLE tablename 
(Error while processing statement: FAILED: 
ParseException line 1:16 missing INPATH at ''path/tp csv/file'' near '<EOF>'
)

Note: i am trying this using RJDBC connection in r

Answer

scalauser picture scalauser · Oct 24, 2014

I think the command to load CSV to Hive table is ( when CSV is in HDFS).

LOAD DATA INPATH '/user/test/my.csv' INTO TABLE my_test;