lburgazzoli edited a comment on pull request #1052:
URL: 
https://github.com/apache/camel-kafka-connector/pull/1052#issuecomment-784202294


   > The thing is, `Struct` itself is a decorated Key:Value with the schema 
support. I understand your concern here but if you want produce data as Map in 
Kafka Connect, Kafka Connect side of things has only two options, either go 
with Map or go with Struct in case you want to preserve the schema information, 
AvroConverter and JsonConverter will produce for you Structs in case the schema 
information are needed in downstream sinks. However, in our case, Camel 
components side of things, we don't acknowledge Structs at all and hence, 
propagating struct vs map downstream has the same effect on downstream 
component, e.g: If the component expects a String but instead got a Map or 
Struct.
   > However, I'd agree this should be an SMT in case we know there are Camel 
components that expect Struct but none need that, and hence I couldn't convince 
myself to ask the user to include a Struct->Map SMT for something we don't even 
support downstream and hence I just wanted to be automatically converted.
   
   My point is that, as input data is component and external system specific, 
then you can certainly  convert Struct to a Map and maybe you are lucky but 
that's really not deterministic. I believe SMT would be better because at this 
stage you requires to have knowledge of the data shape a component support so 
to me, it looks like an explicit choice users have to to take. But I'm the 
least knowledgeable here so I may completely miss the point :)
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to