Hive中一次使用的命令
hive -S -e "select * from mytable LIMIT 3" > /tmp/myquery
模糊获取属性名
hive -S -e "set"|grep warehouse
执行文件中的sql语句
hive -f /path/to/file/withqueries.hql
也可以在hive shell中使用SOURCE命令执行
hive> source /path/to/file/withqueries.hql;
不退出hive CLI执行bash shell命令
hive>!pwd;
在HIVE中使用hadoop的dfs命令
hive> dfs -ls /;
hive脚本注释
-- this is commen