方法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刪除。