bin/hive -help

hive常用的交互操作详解

1.  bin/hive -e "要执行的sql语句";

这样可以不用进入交互式命令行去执行sql语句,直接就能显示出结果

2.   bin/hive -f sql语句脚本目录

可以执行sql脚本文件

 bin/hive -f sql语句脚本目录 > 执行结果要写到的目录

这样可以将执行结果写到指定的位置目录

3.   bin/hive -i <filename>

  与用户udf相互使用

4.在hive交互式命令行中对hdfs文件进行操作

dfs -ls /;

dfs -mkdir -p /usr/ysjh/mapreduce/;

hive常用的交互操作详解

5.在hive交互式命令行中对本地文件进行操作

!ls /opt

hive常用的交互操作详解

6.查看操作历史命令

cd     root

cat   .hivehistory

 

相关文章:

  • 2022-12-23
  • 2021-04-17
  • 2019-08-22
  • 2021-11-26
  • 2021-05-24
  • 2018-04-02
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-20
  • 2022-12-23
  • 2021-11-04
  • 2021-09-15
  • 2022-12-23
  • 2021-08-30
相关资源
相似解决方案