[Hive] 脚本的执行方式

hive脚本的执行方式大致有三种:

# 1. hive控制台执行;
 hive> select * from t1;

# 2. hive -e "SQL"执行; 
hive -e "select * from student where sex = '男'" > /tmp/output.txt

# 3. hive -f SQL文件执行;
hive -f test.sql

猜你喜欢

转载自blog.csdn.net/sinat_25873421/article/details/80325604