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
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