如何向表达式分区表 insert overwrite写入多个分区

【详述】如何向表达式分区表覆盖写入多个分区
【背景】用表达式分区表。覆盖更新overwrite写入最近7天的历史数据,但是官方文档只提供了单个分区的覆盖写入

如何一条sql,向表达式分区表overwrite写入7个分区的数据?
insert overwrite table1 partition(这里咋写)
select * from table2 where pt in (‘20240101’,‘20240102’,‘20240103’,‘20240104’,‘20240105’,‘20240106’,‘20240107’)

partition(分区名)
如:insert overwrite table1 partition(p20240101,p20240102),要硬编码,不像hive那样直接partition(pt)

不行,其他类型的分区是可以的,但是表达式分区这样写不行,报:

你是range分区?show partitions 看下是什么分区类型


建表语句:
CREATE TABLE order_master_mv_temp (
report_date date NOT NULL DEFAULT “20000101” COMMENT “报表统计日期”,
shop_id bigint(20) NOT NULL COMMENT “店铺ID”,
order_status tinyint(4) NOT NULL COMMENT “订单状态 10:存单 20:已落单 40:已结账 30:废单”,
order_sub_type tinyint(4) NOT NULL COMMENT “订单类型(0:堂食 20:外卖 21:自提)”,
channel_key varchar(150) NOT NULL COMMENT “渠道Key”,
channel_name varchar(300) NOT NULL COMMENT “订单来源渠道名称”,
cnt bigint(20) NULL COMMENT “数量”,
year_month_str varchar(32) NULL COMMENT “年月yyyy-mm”,
food_amount_sum decimal(15, 2) NULL COMMENT “流水合计”,
paid_amount_sum decimal(15, 2) NULL COMMENT “实收合计”,
valid_order_count bigint(20) NULL COMMENT “有效订单数”,
member_food_amount_sum decimal(15, 2) NULL COMMENT “有效手机号码对应的流水合计”,
member_paid_amount_sum decimal(15, 2) NULL COMMENT “有效手机号码对应的实收合计”,
member_valid_order_bitmap bitmap NULL COMMENT “有效订单并且是有效手机号的会员bitmap”,
member_valid_order_count bigint(20) NULL COMMENT “有效订单并且是有效手机号的订单数”,
deliver_real_amount_sum decimal(15, 2) NULL COMMENT “配送费实收”,
deliver_promotion_amount_sum decimal(15, 2) NULL COMMENT “配送费优惠”
) ENGINE=OLAP
PRIMARY KEY(report_date, shop_id, order_status, order_sub_type, channel_key, channel_name)
COMMENT “order_master_mv”
PARTITION BY date_trunc(‘day’, report_date)
DISTRIBUTED BY HASH(shop_id) BUCKETS 1
PROPERTIES (
“replication_num” = “1”,
“datacache.enable” = “true”,
“storage_volume” = “builtin_storage_volume”,
“enable_async_write_back” = “false”,
“enable_persistent_index” = “true”,
“persistent_index_type” = “LOCAL”,
“compression” = “LZ4”
);