Skip to content
Advertisement

Tag: datastax

cannot insert list of maps to Apache Cassandra

This is my schema insert query generated by java is in this form issue is with ‘=’ sign in the map objects in the list of maps. How can I insert it correctly? in java. Answer map value should be specified as {key1:val1, key2:val2} (see docs), in your case it should be a but really, you shouldn’t generate literal query

Get a BigInteger attribute from Cassandra ResultSet

I’m trying to get the number of key value pairs in a Cassandra column family. Following is the code I used. But when I ran this code, I’m getting following exception. According to datastax documentation (http://www.datastax.com/drivers/java/2.0/com/datastax/driver/core/Row.html) getVarint should return a BigInteger. So why I am getting a exception here? What an I doing wrong? Answer You can get value as

Advertisement