总结hive常用命令

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#以shll方式执行hive命令
hive -e ""

#执行含有shell命令的脚本
hive -f xx.sh

#清空表中的数据
truncate table db.table

#文件中数据导入到hive
load data inpath '/user/hive/tmp1.csv' into table db.table

#文件中数据导入到hive(覆盖)
load data inpath '/user/hive/tmp1.csv' OVERWRITE into table db.table