One-Way
爱一人,攀一山,追一梦

方法1: hive -f sql文件

  t.sql文件内容:

select *from userinfo limit 10;

  执行命令

hive -f t.sql

 

方法2: 进入hive shell, 执行source命令

进入hive 终端

$ hive
hive>

使用source命令执行

hive>source t.sql

 

 

 

  

  

posted on 2017-10-09 10:46  单行道|  阅读(25670)  评论(1编辑  收藏  举报