版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/yan88888888888888888/article/details/86555555
创建库
use temp;
CREATE EXTERNAL TABLE `table1`(
`column1` string,
`column2` string,
PARTITIONED BY (
`date` string,
`type` string
);
加载分区数据
hive -e"alter table temp.table1add partition(date='$currentday',type='101') location '/user/xxx/in/xxx/$currentday/type=101/';"