简体   繁体   中英

Unable to insert json into cassandra via QueryBuilder in java

I am trying to insert json into cassandra using Querybuilder in java. Dependency that I have in my project is

"com.datastax.cassandra" % "cassandra-driver-core" % "3.0.0"

I referred to this post ( How to insert Json into cassandra using API, QueryBuilder and batch ) for inserting json, however the .json() method does not seem to exist in the queryBuilder class for me.

QueryBuilder.insertInto(KEYSPACE,TABLE).json(jsonData);

It gives me an error

cannot resolve symbol json

Is there any other method or way to insert json into cassandra using QueryBuilder methods ? Please let me know if I am missing something. Thanks in advance !!!

The json function is available from 3.1 version . In 3.0 is not available.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM