Unwrap structs from AvroConverter (MongoDB Kafka Connector)

Hi all,

I’m using a the MongoDB Kafka Sink connector with the AvroConverter for the value.

Imagine having a AVRO schema like (pseudo code)

{
 "id": "string",
 "name": "string",
 "data": {
 null,
DataA struct,
DataB struct,
 }
}

The AvroConverter then converts such a value of this schema into a following document

{
 "id": "1234",
 "name": "Name1",
 "data": {
  "DataA ": { 
    // data of A
  }
 }
}

The question would now be if we could prevent this nesting of these structs (e.g. DataA) so that we would have under the data only the attributes from “DataA” and not wrapped it into the “DataA” attribute.

I was not able to find any hints in the documentation. The only option I would see to write a PostProcessor which does this magic. But I’m hopping there is an already build in functionality which I did not find.

Thanks a lot in advance!