创建库
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/';"
删除分区数据
ALTER TABLE my_partition_table DROP IF EXISTS PARTITION (ds='2019-04-10')