Last active
April 26, 2018 07:27
-
-
Save hadoopsters/889a956bad1d2e4743be626f685f9690 to your computer and use it in GitHub Desktop.
Export Hive Table to CSV: Method 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
hive -e "insert overwrite local directory '/path/in/local/' | |
row format delimited fields terminated by ',' | |
select * from my_database.my_table" | |
cat /path/in/local/* > /another/path/in/local/my_table.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment