hive -e "set hive.cli.print.header=true; select * from data_table where some_query_conditions" | sed 's/[\t]/,/g' > hhd.csv
然后导出的数据编码为utf-8,需要进行转码。
iconv -f UTF-8 -t GBK XXX.csv to XXX_gbk.csv
Hive输出到CSV
最新推荐文章于 2023-11-30 09:28:24 发布
hive -e "set hive.cli.print.header=true; select * from data_table where some_query_conditions" | sed 's/[\t]/,/g' > hhd.csv
然后导出的数据编码为utf-8,需要进行转码。
iconv -f UTF-8 -t GBK XXX.csv to XXX_gbk.csv