One Star

Load data hive

Hi,
I created my hive table using a thiverow with the following command :
"create table test (host string,identityd string,usid string,dated string,timed string,diffgmt string,rtype string,filed string,proto string,code string,bytes string,refer string ,agent string)
row format delimited fields terminated by '\|' stored as textfile"

Then i used a thiverow in order to load a delimited file "\|" with the following command :
"LOAD DATA LOCAL INPATH 'd:\\ic.csv' OVERWRITE INTO TABLE test"

and the last command generate these errors :

Démarrage du job job_connect4 a 14:57 20/09/2012.
connecting to socket on port 3688
connected
Exception in component connectionStatsLogs
java.lang.ClassNotFoundException:
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at routines.system.SharedDBConnection.getConnection(SharedDBConnection.java:62)
at routines.system.SharedDBConnection.getDBConnection(SharedDBConnection.java:131)
at myrenault.job_connect4_0_1.job_connect4.connectionStatsLogsProcess(job_connect4.java:1187)
at myrenault.job_connect4_0_1.job_connect4.preStaLogConProcess(job_connect4.java:505)
at myrenault.job_connect4_0_1.job_connect4.runJobInTOS(job_connect4.java:7153)
at myrenault.job_connect4_0_1.job_connect4.main(job_connect4.java:7022)
Exception in component talendStats_DB
java.lang.NullPointerException
at myrenault.job_connect4_0_1.job_connect4.talendStats_STATSProcess(job_connect4.java:4111)
at myrenault.job_connect4_0_1.job_connect4.runJobInTOS(job_connect4.java:7166)
at myrenault.job_connect4_0_1.job_connect4.main(job_connect4.java:7022)
Query returned non-zero code: 10, cause: FAILED: Error in semantic analysis: Line 1:23 Invalid path ''d:\ic.csv'': only "file" or "hdfs" file systems acceptedQuery returned non-zero code: 10, cause: FAILED: Error in semantic analysis: Line 1:23 Invalid path ''d:\ic.csv'': only "file" or "hdfs" file systems acceptedQuery returned non-zero code: 10, cause: FAILED: Error in semantic analysis: Line 1:23 Invalid path ''d:\ic.csv'': only "file" or "hdfs" file systems acceptedQuery returned non-zero code: 10, cause:

Could someone give a help about this issue ?

Thanks
1 REPLY
Employee

Re: Load data hive

Hi
Is your data already available within HDFS somewhere?I suspect you need to upload the data to HDFS firstly.
See syntax https://cwiki.apache.org/Hive/languagemanual-dml.html
Ciaran