Mongo connector update events issue

12 views
Skip to first unread message

Oleg Ustimenko

unread,
Jun 14, 2024, 6:35:55 AMJun 14
to debezium
Hi!
I have a collection in MongoDB with key names containing a dot (ex "field.1"). And when I receive an update event from Debezium MongoDB connector in updatedFields I also have a keys containing dots as paths to updated values in the collection.
So I cannot locate the exact update path in my document because of a business keys containing a dot. The toy example showing the problem:
create_event = { "field1": { "field.2": "hello", "field": { "2": "HELLO" } }, "field.3": "hello", } update_event = { "field1.field.2": "Hello!", # c["field1"]["field.2"] OR c["field1"]["field"]["2"] "field.3": "Bye!", # c["field.3"] OR c["field"]["3"] (new key) }

How can I deal with it? I see in MongoDB docs that I can use
updateDescription.disambiguatedPaths , but I need to set showExpandedEvents flag to true while creating a cursor. But I cannot do this because as far as I understand the cursor is creating in the connector by its own logic and flags.

jiri.p...@gmail.com

unread,
Jun 14, 2024, 6:38:55 AMJun 14
to debezium
Hi,

could you please create a ew Jira feature request so the connector code can do it?

Thanks

Jiri

Reply all
Reply to author
Forward
0 new messages