python操做hive而且获取查询结果scheam

 

执行hive -e 命令而且获取对应的select查询出来的值及其对应的scheam字段git

须要在执行语句中前部添加 set hive.cli.print.header=true; 这个设置,以下语句: hive -e "set hive.cli.print.header=true;use default;select * from students"github

这样最后的结果中会返回查询出来的字段值及其对应的scheamspa

 

源码参考地址:https://github.com/xjh713/hive-get-scheam.gitget

相关文章
相关标签/搜索