Skip to content

Latest commit

 

History

History
9 lines (7 loc) · 303 Bytes

Hive导出csv文件.md

File metadata and controls

9 lines (7 loc) · 303 Bytes
hive -e "set hive.cli.print.header=true; SELECT * FROM default.s_transit_people_ic_cache " | sed 's/[\t]/,/g'  > outputData.csv

参数说明: - set hive.cli.print.header=true:输出表头 - sed 's/[\t]/,/g:将\t替换成, - > outputData.csv:输出到 outputData.csv 文件中