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
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