hive 执行sql脚本。

Hive执行sql文件
方法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


版权声明:本文为eases_stone原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。