一、 Hive使用技巧
1 、Hive常用交互命令
1)“-e”不进入hive的交互窗口执行hql语句
[root@bg01 hive]$ bin/hive -e "select id from student;"
2)“-f”执行脚本中的hql语句
(1)在/opt/module/hive/下创建datas目录并在datas目录下创建hivef.sql文件
[root@bg01 hive]$ mkdir datas
[root@bg01 datas]$ vim hivef.sql
(2)文件中写入正确的hql语句
select * from st