If there's a complex id type or other struct within a MongoDB document, the UnwrapFromMongoDbEnvelope will correctly restore a Struct from that property, but e.g. the JDBC sink connector only can deal with flat structures.
There should be an option for the SMT for flattening out such structs by concatenating the fields into plain properties, using a (configurable) character. E.g. when receiving a document with an ide like this:
The SMT should optionally emit the following two fields:
So we'd have two new options for the SMT:
- flatten_structs: boolean, defaults to false
- flattened_structs_field_concat_char: string, defaults to "_"
Note that this option cannot be used to deal with arrays.