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

NewolympicData

  Alison Bartosik 21 United States 2004 08-29-04 Synchronized Swimming 0 0 2 2 Anastasiya Davydova 21 Russia 2004 0...