stream-reactor icon indicating copy to clipboard operation
stream-reactor copied to clipboard

Cassandra sink connector : how to add whole topic JSON as it is into single cassandra table column

Open neerajk22 opened this issue 4 years ago • 1 comments

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

neerajk22 avatar Dec 30 '20 18:12 neerajk22

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/

conradkleinespel avatar Apr 12 '22 16:04 conradkleinespel