-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consume JSON string for Cassandra sink connector #1487
Comments
Folks, I won't be able to look too much into this today as I am in PTO, but ... by the way it sounds, it seems like something you would need to use a Single Message Transformation (SMT) to do so. Have you tried using that? |
More specifically: maybe you want to implement a custom SMT to do so. |
@oscerd @orpiske Thanks for the quick reply whilst on PTO. Using a custom SMT was going to be my last resort, I was just wondering if this connector implemented something similar to the Datastax connector, which can map JSON fields to Cassandra columns (https://docs.datastax.com/en/kafka/doc/kafka/kafkaStringJson.html) ? |
We reverted to implementing our own SMT that did the trick in the end, thanks |
Hello,
I'm trying to get the Cassandra sink connector to work with a JSON string produced to a Kafka topic. I've managed to get the connector to add rows to my table when producing the Kafka message:
But would instead like to produce messages on to the topic in the following format:
I've attempted to use
value.converter=org.apache.kafka.connect.json.JsonConverter
in my sink properties, but receive the exception:NoTypeConversionAvailableException: No type converter available to convert from type: java.util.HashMap to the required type: java.io.InputStream
.Is it possible to achieve this with the Camel Cassandra sink connector?
Cassandra table:
Sink properties:
The text was updated successfully, but these errors were encountered: