我有以下由debezium生成的主题(json,而不是avro)
“payload”:{“id”:1,“name”:“test”:“uuid”:“f9a96ea4-3ff9-480f-bf8a-ee53a1e6e583”}
如何将“\u id”字段(在mongo集合中)设置为相同的值“uuid”?
这是我的Flume配置:
{
"name": "mongo-sink",
"config": {
"connector.class": "com.mongodb.kafka.connect.MongoSinkConnector",
"tasks.max": 3,
"key.converter": "org.apache.kafka.connect.json.JsonConverter",
"value.converter": "org.apache.kafka.connect.json.JsonConverter",
"topics": "s4farm.animal",
"connection.uri": "mongodb://user:password@host:port/?authSource=database",
"database": "database",
"collection": "s4farm_animal",
"document.id.strategy": "com.mongodb.kafka.connect.sink.processor.id.strategy.PartialValueStrategy",
"value.projection.list": "id",
"value.projection.type": "whitelist",
"writemodel.strategy": "com.mongodb.kafka.connect.sink.writemodel.strategy.ReplaceOneBusinessKeyStrategy"
}
}
你能帮助我吗?
暂无答案!
目前还没有任何答案,快来回答吧!