- 如果clickhouse表 ENGINE = ReplacingMergeTree -- 分区内按排序键去重 那么就需要使用starrocks中的主键模型或者更新模型
- 主键模型注意事项:
- 组合主键长度不能超过128字节 否则报错: primary key size exceed the limit
clickhouse ddl demo:
```sql
-- ReplacingMergeTree 更新模型
CREATE TABLE tb1
(
`id1` UInt64,
`id2` String,
`f1` String,
`f2` String,
`f3` Int32,
`f4` String,
`f5` String,
`f6` String,
`f7` String,
`f8` Int32,
`f9` String,
`f10` String,
`f11` Int32,
`f12` String,
`f13` UInt64,
`f14` Nullable(UInt64),
`f15` Nullable(UInt64),
`f16` Nullable(UInt64),
`f17` Nullable(String),
`f18` Nullable(Decimal(14, 4)),
`f19` Nullable(Decimal(14, 4)),
`f20` Nullable(Decimal(14, 4)),
`f21` Nullable(String),
`f22` N
flink1.18 sink clickhouse 迁移 sink starrocks 参考案例
最新推荐文章于 2025-07-07 22:21:09 发布