Aiven-Open/transforms-for-apache-kafka-connect

Hash SMT replaces the whole message

Closed this issue ยท 6 comments

I am adding this here too, so when i tested this with the following connector configuration:

    "transforms.HashEmail.type": "io.aiven.kafka.connect.transforms.Hash$Value",
    "transforms.HashEmail.field.name": "email",
    "transforms.HashEmail.function": "md5",
    "transforms.HashEmail.skip.missing.or.null": "true"

What i end up with is just the hashed value, it seems the whole message is replaced instead of just the email field, i end up with something like this:

"5ABCdefTu+abc123456789=="

maybe @brbrown25, before i dig into this, you already know maybe where to fix this.

@nick-zh I can take a look at this, I think I might know where it's happening. will do that this afternoon/evening.

@ivanyu and @nick-zh I see the issue and can have a fix this evening. It is indeed hashing the entire value and setting it rather than just on the configured field

@brbrown25 thx for the quick feedback, really appreciate it โœŒ๏ธ

pr is opened that should address this issue!

Big thanks to @brbrown25 and @ivanyu for reacting so quickly ๐Ÿ™‡