ElasticSink connector, delete rows with non-null value body

Is there any way to handle the case, when for delete action we send a message with not-null body?
Im thinking about applying transformation with a condition - like to apply drop value transformation only on rows that have deleted flag true in their bodies, and after that continue connect’s processing for all records(both delete, update, create)?
smth like this:

        "`behavior.on.null.values`": "delete",
        "transforms": "dropPrefix,timestampConverter,filterout",

        "transforms.dropPrefix.type":"org.apache.kafka.connect.transforms.RegexRouter",
        "transforms.dropPrefix.regex":"#topicprefix#-(.*)",
        "transforms.dropPrefix.replacement":"$1_index_filter",

        "transforms.filterout.type":"io.confluent.connect.transforms.Filter$Value",
        "transforms.filterout.filter.type":"include",
        "transforms.filterout.filter.condition":"$[?(@.metadata.eventType =~ /.*DELETED/)]",
        
        "transforms.timestampConverter.type": "org.apache.kafka.connect.transforms.TimestampConverter$Value",
        "transforms.timestampConverter.format": "yyyy-MM-dd",
        "transforms.timestampConverter.target.type": "string",

      "transforms.dropMetadata.type":"org.apache.kafka.connect.transforms.ReplaceField$Value",
        "transforms.dropMetadata.blacklist":"metadata,modifiedOn",

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.