时间: 2020-09-18|28次围观|0 条评论

Hive执行命令方式有cli,jdbc,hwi,beeline,而我们常用的往往是cli shell 操作。

cli shell

hive -help
hive --help

注:命令脚本必须在集群的节点或hiveclient执行。
Hive Cilent数据操作插图

hive -e "select * from testtable"

hive -S -e "select * from testtable"

hive -S -e "select * from testtable" > /liguodong/hivedata/testtab

hive -v -e "select * from testtable" > /liguodong/hivedata/testtab

 hive -f "/liguodong/hivedata/hql"

hive -v -e "select name from testtable" > /liguodong/hivedata/testtab

Hive Cilent数据操作插图1

Hive Cilent数据操作插图2

shell中使用hive

Hive Cilent数据操作插图3

list和source命令

Hive Cilent数据操作插图4

hive操作变量

配置变量

set val='';
${hiveconf:val}

Hive Cilent数据操作插图5

环境变量

${env:HOME}

**注:**env查看所有环境变量
Hive Cilent数据操作插图6

原文链接:https://blog.csdn.net/scgaliguodong123_/article/details/46897825

本站声明:网站内容来源于网络,如有侵权,请联系我们,我们将及时处理。

本博客所有文章如无特别注明均为原创。
复制或转载请以超链接形式注明转自起风了,原文地址《Hive Cilent数据操作
   

还没有人抢沙发呢~