发布第一个插入:
{"Customer_id": 2, "transaction_id": "1", "idd": [999, 1111], "id": 1}
然后是第二个:
{"Customer_id": 2, "transaction_id": "2", "idd": [9, 10], "id": 1}
要求的结果:
{"Customer_id": 2, "transaction_id": "2", "idd": [[9, 10] , [999, 1111]], "id": 1}
我得到了什么:
{"Customer_id": 2, "transaction_id": "2", "idd": [9, 10] , "id": 1}
更新策略此更新数组不追加,但我的预期结果追加数组
配置 :
document.id.strategy=com.mongodb.kafka.connect.sink.processor.id.strategy.PartialValueStrategy
value.projection.list=customer_id,transaction_id
value.projection.type=whitelist
writemodel.strategy=com.mongodb.kafka.connect.sink.writemodel.strategy.ReplaceOneBusinessKeyStrategy
我们如何通过 mongo-kafka sink 连接器做到这一点