-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Description
按照文档对表进行动态分区转换
ALTER TABLE example_db.`Location` SET
(
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.buckets"="32",
"dynamic_partition.start" = "-32",
"dynamic_partition.end" = "7"
);但是得到错误
ERROR 1064 (HY000): errCode = 2, detailMessage = Table default_cluster:example_db.Location is not a dynamic partition table. Use command `HELP ALTER TABLE` to see how to change a normal table to a dynamic partition table.
FE已配置dynamic_partition_enable=true
建表语句
CREATE TABLE example_db.`Location` (
`Id` varchar(36) NOT NULL,
`SimNumber` varchar(15) NULL,
`Latitude` int(11) NOT NULL,
`Longitude` int(11) NOT NULL,
`Altitude` smallint(6) NOT NULL,
`Speed` smallint(6) NOT NULL,
`Direction` smallint(6) NOT NULL,
`DateTime` datetime NOT NULL,
`IsBatch` boolean NOT NULL,
`CreateDateTime` datetime NOT NULL
) ENGINE=OLAP
UNIQUE KEY(`Id`, `SimNumber`)
COMMENT "OLAP"
DISTRIBUTED BY HASH(`SimNumber`) BUCKETS 10
PROPERTIES (
"replication_num" = "1",
"in_memory" = "false",
"storage_format" = "V2"
);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels