从文件中执行hql语句 hive -f test.hql;shell
在hive shell中使用source执行脚本 source test.hql;test
注:hive执行语句的文件一般使用.hql或.q为后缀名,但不是必须的。脚本