The command to export csv without some useless output is:
beeline -u jdbc:hive2://localhost:10000/default --silent=true --outputformat=csv2 -e "select * from sample_07 limit 10" > out.csv
kerberos
Parts that can be left out if already used -u
. as follows:
beeline -e "select * from sample_07 limit 10" > out.csv
If there is still some useless output, you can use to sed
delete the first N lines:
sed -i '1,6d' out.csv