[ 
https://issues.apache.org/jira/browse/KAFKA-8523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16931777#comment-16931777
 ] 

Frederic Tardif commented on KAFKA-8523:
----------------------------------------

just to clarify my comment above. The `behavior.on.null.values` already exists 
(at least on the elasticsearch connector), so it is important to keep the null 
values when we aim to interpret it as `delete` on an elasticsearch index entry. 
Applying a transform that InsertFields on null would completely defies the 
purpose in this scenario. I strongly believe the transform should skip null 
values or this transform behaviour should at least be configurable.  

 

!image-2019-09-17-15-53-44-038.png!

> InsertField transformation fails when encountering tombstone event
> ------------------------------------------------------------------
>
>                 Key: KAFKA-8523
>                 URL: https://issues.apache.org/jira/browse/KAFKA-8523
>             Project: Kafka
>          Issue Type: Bug
>          Components: KafkaConnect
>            Reporter: Gunnar Morling
>            Priority: Major
>         Attachments: image-2019-09-17-15-53-44-038.png
>
>
> When applying the {{InsertField}} transformation to a tombstone event, an 
> exception is raised:
> {code}
> org.apache.kafka.connect.errors.DataException: Only Map objects supported in 
> absence of schema for [field insertion], found: null
>       at 
> org.apache.kafka.connect.transforms.util.Requirements.requireMap(Requirements.java:38)
>       at 
> org.apache.kafka.connect.transforms.InsertField.applySchemaless(InsertField.java:138)
>       at 
> org.apache.kafka.connect.transforms.InsertField.apply(InsertField.java:131)
>       at 
> org.apache.kafka.connect.transforms.InsertFieldTest.tombstone(InsertFieldTest.java:128)
> {code}
> AFAICS, the transform can still be made working in in this case by simply 
> building up a new value map from scratch.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to