错误: Key columns should be a ordered prefix of the schema.
解决:建表时UNIQUE KEY必须放在所有字段前面声明且保证有序
示例
drop TABLE `vhc_data_models`
CREATE TABLE IF NOT EXISTS `vhcDWH`.`vhc_data_models`
(
`id` SMALLINT COMMENT "",
`ton` VARCHAR(5) COMMENT "",
`models` VARCHAR(30) COMMENT "",
`vin` VARCHAR(20) COMMENT ""
) ENGINE = OLAP
UNIQUE KEY(`id`)
DISTRIBUTED BY HASH
(
`id`
) BUCKETS 1
PROPERTIES
(
"storage_type" =
"COLUMN",
"storage_medium" =
"SSD",
"storage_cooldown_time" =
"2099-12-2 00:00:00",
"replication_num" =
"1"
);
show tables;