[ https://issues.apache.org/jira/browse/KAFKA-9326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
rameshkrishnan muthusamy resolved KAFKA-9326. --------------------------------------------- Resolution: Invalid > Kafka Connect JSON Converter results in data loss when additional fields > apart from provided JSON schema is present in the payload > ---------------------------------------------------------------------------------------------------------------------------------- > > Key: KAFKA-9326 > URL: https://issues.apache.org/jira/browse/KAFKA-9326 > Project: Kafka > Issue Type: Bug > Components: KafkaConnect > Affects Versions: 3.0.0, 2.3.0, 2.2.1, 2.3.1 > Reporter: rameshkrishnan muthusamy > Priority: Major > Labels: kafka-connect > > JSON Convertor in Kafka Connect validates the payload against the schema > provided by the user. In case there is an additional field in the payload > which is not mentioned in the schema the JSON convertor does not fail and > returns the value without the additional column. > e.g) message has additional column "new_col" > { > "schema": { > "type": "struct", > "fields": [ > { > "type": "string", > "optional": true, > "field": "type" > }, > { > "type": "string", > "optional": false, > "field": "data" > } > ], > "optional": false, > "name": "test" > }, > "payload": { > "type": "testpayload", > "data": "test_data", > "new_col": 1 > } > } > The output of JSON convertor "Struct\{type=testpayload,data=test_data}" > should ideally fail assuming fail fast rather than skipping the field in the > output payload. > -- This message was sent by Atlassian Jira (v8.3.4#803005)