1
2
3
4
5
6
7
8
9
-- create books table in Hive

set hive.exec.compress.output=false; 
create table csv_books ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' as
select * from books; -- this will creates table
show tables; -- see tables

-- Go to HDFS & export as csv file
bin/hadoop fs -cat /user/hive/warehouse/csv_books/000000_0 >> csv_books.csv