Search This Blog

Monday, 20 February 2017

loading excel data in to hive

loading excel data in to hive  in csv format


first create an excel save as .csv


sample.csv file


hive> create table excsv(
    > col1 string,
    > col2 string,
    > col3 string)
    > row format delimited
    > fields terminated by ','
    > lines terminated by '\n'
    > stored as textfile;
OK



Time taken: 0.307 seconds
hive> load data local inpath'sample.csv' overwrite into table excsv;

hive> select * from excsv;
OK
a       b       c
a       s       d
a       d       d
a       c       d
a       c       d
a       c       d
a       c       d

No comments:

Post a Comment

Hadoop Analytics

pigdemo-1

 1. first create data file emp111.txt in ur LFS 2. MOVE to HDFS 3. OPen vi editor type Pig Script 4. vi pig1.pig bag1= load 'emp.txt...