執行hive -e 命令並且獲取對應的select查詢出來的值及其對應的scheam字段
需要在執行語句中前部添加 set hive.cli.print.header=true; 這個設置,如下語句: hive -e "set hive.cli.print.header=true;use default;select * from students"
這樣最后的結果中會返回查詢出來的字段值及其對應的scheam
源碼參考地址:https://github.com/xjh713/hive-get-scheam.git