I have started working with Cassandra database
. I am planning to use Datastax API to upsert/read
into/from Cassandra database
. I am totall
In your cassandra.yaml file look for the tag start_native_transport, by default its disabled, enable it.
Playing with Datastax Java Driver is quite similar like jdbc driver.
Insertion code
String query = "insert into test(key,col1,col2) values('1','value1','value2')";
session.execute(query);
Reading from Cassandra
String query="select * from test;";
ResultSet result = session.execute(query);
for (Row rows: result){
System.out.println(rows.getString("key"));
}