For mongo kafka and using as sink connector, how do I map Id to _id?

406 views
Skip to first unread message

Long Mai

unread,
Oct 14, 2019, 4:51:49 PM10/14/19
to mongodb-user
Hey,

I'm new to mongodb. I am trying to use mongo kafka as a sink connector. I'm able to connect stream the records from a topic into mongo db. The value is in a JSON format without schema. I have a field in the value called Id. How do I go about doing a one to one mapping from Id to _id? I see options such as document.id.strategy and field.renamer.mapping (referenced from https://github.com/mongodb/mongo-kafka/blob/master/docs/sink.md), but I haven't gotten it to work. Can anyone guide me or have ideas on what I should try?

Thanks in advance.

Long Mai

Long Mai

unread,
Oct 16, 2019, 3:08:36 PM10/16/19
to mongodb-user
Reply all
Reply to author
Forward
0 new messages