Hive Tutorial 35 : Export hive table data into a file
There are couple of ways to do this
Process 1:
hive -e 'select books from table' | sed 's/[[:space:]]\+/,/g' > /home/lvermeer/temp.csv
Process 2 :
INSERT OVERWRITE LOCAL DIRECTORY 'dir_path' SELECT FIELD1, FIELD2, FIELD3 FROM TABLE1;
Comments
Post a Comment