kafka-connect-elasticsearch
kafka-connect-elasticsearch copied to clipboard
support STRUCT message keys
Problem
There is currently no way to sink messages with composite keys without ignoring those keys.
Error "STRUCT is not supported as the document id."
https://github.com/confluentinc/kafka-connect-elasticsearch/issues/193
Solution
Convert message key STRUCT to a string for the doucment id.
Does this solution apply anywhere else?
- [ ] yes
- [ ] no
Test Strategy
unit test provided for DataConverter
Testing done:
- [x] Unit tests
- [ ] Integration tests
- [ ] System tests
- [ ] Manual tests
Release Plan
It looks like @deuscapturus hasn't signed our Contributor License Agreement, yet.
The purpose of a CLA is to ensure that the guardian of a project's outputs has the necessary ownership or grants of rights over all contributions to allow them to distribute under the chosen licence. Wikipedia
You can read and sign our full Contributor License Agreement here.
Once you've signed reply with [clabot:check]
to prove it.
Appreciation of efforts,
clabot
[clabot:check]
@confluentinc It looks like @deuscapturus just signed our Contributor License Agreement. :+1:
Always at your service,
clabot
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
I feel like a better solution is to just use a Transform on the Key
For example - https://jcustenborder.github.io/kafka-connect-documentation/projects/kafka-connect-transform-common/transformations/ToJSON.html