Closed sgandon closed 1 year ago
Hi!
If you want to express this avro array as a json sting in the target system this SMT might be a solution for your problem.
At the moment the SMT takes the whole value and transforms it a json string.
If you need to just one specific sub-part of your records schema you can easily combine this SMT with other SMTs. Like with replacField to drop all other fields before you transform it to a json (https://rmoff.net/2020/12/21/twelve-days-of-smt-day-10-replacefield/)
Hello @an0r0c , how might I accomplish this without losing any fields? Is there a way to use existing SMTs and this transform to achieve that? Basically, I have a schema with some regular fields and a field that's complex that I'd like to transform. Then using the JDBC sink, put that into a PostgreSQL table with a few primitive columns and a JSON column for that one complex field.
Any thoughts would be greatly appreciated.
Hi,
I think that is not possible with the current implementation. It takes the whole value structure and "maps" it to a simple schema that contains one simple string field and you can specify the name of this field.
Hello,
I am interested by your connector in order to transform an avro array of records with 2 fields. 1/ Do you think you transformer could help me in that regard. 2/ How do you specify which field to transform to json because I just want this array in json and not the whole record.