mthoutai

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

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

cli shell

hive -help
hive --help

注:命令脚本必须在集群的节点或hiveclient运行。

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

shell中使用hive

list和source命令

hive操作变量

配置变量

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

环境变量

${env:HOME}

**注:**env查看全部环境变量

posted on 2017-06-12 09:23  mthoutai  阅读(422)  评论(0编辑  收藏  举报