命令
hive -e " set hive.cli.print.header=true; #將表頭輸出 select * from data_table where some_query_conditions " | sed 's/[\t]/,/g' > hhd.csv
set hive.cli.print.header=true
將表頭輸出;sed 's/[\t]/,/g'
將\t
替換成,
>
將shell
里打印的內容輸出到文件
命令
hive -e " set hive.cli.print.header=true; #將表頭輸出 select * from data_table where some_query_conditions " | sed 's/[\t]/,/g' > hhd.csv
set hive.cli.print.header=true
將表頭輸出;sed 's/[\t]/,/g'
將\t
替換成,
>
將shell
里打印的內容輸出到文件
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。