Connect Cassandra NoSQL DB and get the response as JSON response Connect Cassandra NoSQL DB and get the response as JSON response elasticsearch elasticsearch

Connect Cassandra NoSQL DB and get the response as JSON response


You can query your data and retrieve a JSON string with the following type of queries:

SELECT JSON keyspace_name, durable_writes FROM system_schema.keyspaces ;

This will return you a json string that maps the keys (column name) with the corresponding value.See the doc here: http://cassandra.apache.org/doc/latest/cql/json.html

Then you could re-insert the json string in Cassandra, if that's what you want.

If you need to do that at scale, or as a streaming job, you would want to look at using Spark on top of Cassandra: Load your Cassandra data into spark, use spark to transform that into a JSON string, and reinsert into Cassandra or another db.