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数据操作

Hive Cilent数据操作

shell中使用hive

Hive Cilent数据操作

list和source命令

Hive Cilent数据操作

hive操作变量

配置变量

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

Hive Cilent数据操作

环境变量

${env:HOME}

**注:**env查看全部环境变量
Hive Cilent数据操作

相关文章:

  • 2021-06-14
  • 2021-09-22
  • 2022-12-23
  • 2021-07-17
  • 2022-01-27
  • 2021-06-19
  • 2022-02-11
  • 2021-09-30
猜你喜欢
  • 2022-02-27
  • 2022-12-23
  • 2021-09-12
  • 2021-12-14
  • 2021-05-11
  • 2022-12-23
  • 2021-11-03
相关资源
相似解决方案