Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Hive, mail # user - LOAD HDFS into Hive


Copy link to this message
-
LOAD HDFS into Hive
venkatramanan 2013-01-25, 13:00
Hi,

I need to load the hdfs data into the Hive table.

For example,

Am having the twitter data and its updated daily using the streaming
API. These twitter responses are stored into the HDFS Path named like
('TwitterData'). After that i try to load the data into the Hive. using
the 'LOAD DATA stmt'. My problem is that hdfs data is lost once i load
the data. is there any way to load the data without the hdfs data lose.

To Create the Table using the below stmt;

CREATE EXTERNAL TABLE Tweets (FromUserId String, Text string,
FromUserIdString String, FromUser String, Geo String, Id BIGINT,
IsoLangCode string, ToUserId INT, ToUserIdString string, CreatedAt
string) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' LINES TERMINATED
BY '\n';

To LOAD the data using the below stmt;

LOAD DATA INPATH '/twitter_sample' INTO TABLE tweets;

thanks in advance

Thanks,
Venkat
+
bejoy_ks@... 2013-01-25, 13:07
+
venkatramanan 2013-01-25, 13:13
+
venkatramanan 2013-01-25, 13:17