stream-reactor
stream-reactor copied to clipboard
Cassandra sink connector : how to add whole topic JSON as it is into single cassandra table column
I am using Cassandra Sink Connector with Kafka, now i want to insert whole topic JSON as it is into single Cassandra table column instead of creating diff cols. so what should be the connector KCQL expression ?
INSERT INTO connector_json_table SELECT * as message FROM test-nk-29-dec
test-nk-29-dec is topic name connector_json_table is Cassandra Table name
connector_json_table contains only one single column with "Text type", Now i want to insert complete JSON into this col
You may want to look into using Single Message Transforms which can help shape the data any way you want it to be. I've found this series of videos to be quite useful: https://rmoff.net/2021/01/04/kafka-connect-deep-dive-into-single-message-transforms/