mongodb debezium schema builder issue

46 views
Skip to first unread message

רום כהן

unread,
Aug 10, 2025, 3:50:01 AMAug 10
to debezium
Hi

we are trying to stream data from mongo source, our messages looks as follows:
{
    _id: 1,
    guests: [
        {
              name: "john",
              features: [
                  {
                       a: "some_string"
                  }
              ]
        },
        {
              name: "doe",
              features: []
        }
    ]
}

As you can see, the "features" sub-array is of type struct. However, when we try to CDC on this document, debezium crashes with the following error:

org.apache.kafka.connect.errors.DataException: Not a struct schema: Schema{STRING}

From my testing, I was able to see that the crash happpens when at least one element is populated and at least one is empty.
I suspect that this issue arises because the MongoDataConverter can't correctly parse arrays of type struct when one of the elements is empty.


Anisha Mohanty

unread,
Aug 11, 2025, 12:47:48 AMAug 11
to debe...@googlegroups.com
Hi,

Which debezium version are you using and what is the encoding mode?

--
You received this message because you are subscribed to the Google Groups "debezium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to debezium+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/debezium/e05d1d23-7993-4eda-b160-e8ef2da73bd2n%40googlegroups.com.

רום כהן

unread,
Aug 11, 2025, 2:53:35 AMAug 11
to debezium
We tried using v3.2.0 and 3.3.0 snapshot, encoding mode array.

ב-יום שני, 11 באוגוסט 2025 בשעה 07:47:48 UTC+3, anmo...@redhat.com כתב/ה:

רום כהן

unread,
Aug 17, 2025, 9:38:42 AMAug 17
to debezium
HI
any update?

ב-יום שני, 11 באוגוסט 2025 בשעה 09:53:35 UTC+3, רום כהן כתב/ה:
Reply all
Reply to author
Forward
0 new messages