【已解决】flink-doris-connector导入doris指定sink.properties.columns字段报错

Viewed 114

flink-doris-connector版本 1.0.3
doris版本 1.2.7

flink-doris-connector导入doris指定sink.properties.columns字段报错,不指定sink.properties.columns可正常导入,报错如下

Reason: actual column number in csv file is more than schema column number.actual number: 11, column separator: [], line delimiter: [], schema column number: 10

3 Answers

参考答案:增加配置'sink.enable-delete'='false',可以正常导入

你是如何指定的?有例子吗?

不指定sink.properties.columns正常
CREATE TABLE test(
order_id int,
use_area int,
click_cnt int
) WITH (
'connector' = 'doris',
'fenodes' = 'xxx:8030',
'table.identifier' = 'xxx',
'username' = 'xxx',
'password' = 'xxx'
);

指定sink.properties.columns报错
CREATE TABLE test(
order_id int,
use_area int,
click_cnt int
) WITH (
'connector' = 'doris',
'fenodes' = 'xxx:8030',
'table.identifier' = 'xxx',
'username' = 'xxx',
'password' = 'xxx',
'sink.properties.columns' = 'order_id,use_area,click_cnt'
);