Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Importing data from HDFS to Hive table

Tags:

hadoop

hive

hdfs

I have my data in data/2011/01/13/0100/file in HDFS, each of thes file contain data in tab separated, say name, ip , url.

I want to create a table in Hive and import the data from hdfs, table should contain time,name, ip and url.

How can I import these using Hive ? r the data should be in some other format so that I can import the time as well ?

like image 258
AlgoMan Avatar asked Oct 12 '22 05:10

AlgoMan


1 Answers

You need to create the table to load the files into and then use the LOAD DATA command to load the files into the Hive tables. See the Hive documentation for the precise syntax to use.

Regards, Jeff

like image 90
Jeff Hammerbacher Avatar answered Oct 18 '22 01:10

Jeff Hammerbacher