0


大数据之写入Doris数据问题

  1. 解决Key columns should be a ordered prefix of the schema. KeyColumns[1] (starts from zero) is xxx, but

背景

create table if not exists XXX (

`fathercorp` varchar(50),

`id` decimalv3(38,0)

) ENGINE=OLAP

UNIQUE KEY(id)

COMMENT 'xxxx'

DISTRIBUTED BY HASH(id) BUCKETS 10

PROPERTIES (

"replication_allocation" = "tag.location.default: 3",

"is_being_synced" = "false",

"storage_format" = "V2",

"enable_unique_key_merge_on_write" = "true",

"light_schema_change" = "true",

"store_row_column" = "true",

"disable_auto_compaction" = "false",

"enable_single_replica_compaction" = "false"

);

解决方案:

将错误Key columns should be a ordered prefix of the schema. KeyColumns[1] (starts from zero) is aa, but corresponding column is bb in the previous columns declaration.

由于**UNIQUE KEY(id)**中的字段必须为DDL建表语句的第一列,有顺序关系,然后问题解决

2.关于由于源表Oracle字段类型长度引起的错误

具体详细原因:

因为我们建表的时候,也是依据Oracle源表的字段长度进行建表的,如果在Doris中进行建表,字段长度类型尽可能的大一点,这样可以避免这种错误


本文转载自: https://blog.csdn.net/wb_zjp283121/article/details/140527762
版权归原作者 梦想一直在路上 所有, 如有侵权,请联系我们删除。

“大数据之写入Doris数据问题”的评论:

还没有评论