动态分区参数无效.
enjoy_oracle 发布于2021-07 浏览:2521 回复:2
0
收藏

[版本]
Baidu Doris version 0.14.7-Unknown

[操作]

创建动态分区的表, 预想保留最近30天的数据. 建表脚本(隐掉了表名和其他字段):

CREATE TABLE `表名` (
  `event_time` datetime NULL COMMENT "事件的业务时间",
  其他字段 ... ... 
) ENGINE=OLAP
PARTITION BY RANGE(event_time) ()
DISTRIBUTED BY HASH(event_time)
PROPERTIES
(
    "dynamic_partition.enable" = "true",
    "dynamic_partition.time_unit" = "DAY",
    "dynamic_partition.start" = "-30",
    "dynamic_partition.end" = "3",
    "dynamic_partition.prefix" = "p",
    "dynamic_partition.buckets" = "1",
    "dynamic_partition.create_history_partition" = "true"
);

[出现的问题]

提示dynamic_partition.create_history_partition参数无效. 错误提示:

errCode = 2, detailMessage = Unknown properties: {dynamic_partition.create_history_partition=true}

[其他说明]

若是去掉参数"dynamic_partition.create_history_partition",  此动态分区表是可以创建成功的.

 

收藏
点赞
0
个赞
共2条回复 最后由Ling缪回复于2021-07
#3Ling缪回复于2021-07

是的,这是一个新增功能。

0
#2enjoy_oracle回复于2021-07

已发现原因, 是部署的doris版本问题.

doris官方文档没说该参数从什么版本开始支持, 查了change log了解是0.14.12版本新增的特性
https://mp.weixin.qq.com/s/P3ripw7Hp_lLwlj86-uAAA

0
快速回复
TOP
切换版块