`
小网客
  • 浏览: 1218364 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

hive执行hql脚本

 
阅读更多

需求:

基于hive做hdfs的统计分析

涉及点:

1.基于hive 执行hql脚本:

hive -f /home/usr/my.sql

2.基于hive执行hql命令:

bin/hive -e "select count(1) from tab;"

3.安静模式执行,不打印mrjob的进度:

hive -S -f /home/usr/my.sql

4.执行结果存入一个txt文件里:

bin/hive -S -e "select * from tab" >tab.txt

 

0
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics