方法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
方法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
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。