dataSourceKey: defaultDS
destination: test3_single
groupId: g1
esMapping:
_index: test3_single
_id: _id
sql: "select a.id as _id,a.id as id,a.type_bigint,a.type_char,a.type_varchar,a.type_text,a.type_decimal,a.type_datetime,a.type_date from sbtest.tb_single as a"
etlCondition: "where id>{}"
commitBatch: 1000
adapter2
dataSourceKey: defaultDS
destination: test3_many
groupId: g2
esMapping:
_index: test3_many
_id: id
sql: "select a.id,a.type_bigint,a.type_text,a.type_datetime,
b.pid as child1_id,b.type_bigint as child1_bigint,
concat(b.type_arr1,';',b.type_arr2) as child1_arr,
concat('\"[',b.type_arrobj1,',',b.type_arrobj2,']\"') as child1_arrobj
from sbtest.tb_parent as a
left join sbtest.tb_child1_1 as b on a.id=b.pid
"
objFields:
child1_arr: array:;
child1_arrobj: object
etlCondition: "where id>{}"
commitBatch: 1000
adpater: v1.1.6 es: v7.10.2
canal同步数据到kafka,adapter消费kafka数据同步到es。 多表关联,插入主表1条数据可以同步到es,然后更新这条数据,同步报错(针对下面的adapter2配置):
对应的配置如下: application.yml
adapter1
adapter2
但是如果把拼接的 child1_arrobj字段及其属性child1_arrobj: object删除,更新又能正常同步了。 所以这个错误应该是和object对象有关,有谁知道怎么解决吗?