I have some data in HIVE, and I would like to see it in LibreOffice.
How do I export this data and later import it on Libreoffice
You can easily import tasks from a CSV file into a Hive project. To begin, download a sample CSV by going to your profile dropdown, then Import tasks, and selecting Import CSV.
To directly save the file in HDFS, use the below command: hive> insert overwrite directory '/user/cloudera/Sample' row format delimited fields terminated by '\t' stored as textfile select * from table where id >100; This will put the contents in the folder /user/cloudera/Sample in HDFS. Save this answer.
Based on https://issues.apache.org/jira/browse/HIVE-1603:
$ hive
hive> set hive.exec.compress.output=false;
hive> create table csv_dump ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' as
hive> select ...YOUR_SELECT_QUERY_HERE...;
$ hadoop dfs -cat /user/hive/warehouse/csv_dump/* > ~/csv_dump.csv
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With