cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Johnson <>
Subject Creating 'Put' requests
Date Thu, 23 Apr 2015 13:28:38 GMT
Hi all,

Currently looking at switching from HBase to Cassandra, and one big
difference so far is that in HBase, we create a ‘Put’ object, add to it a
set of column/value pairs, and send the Put to the server. So far in
Cassandra 2.1.4 the tutorials seem to suggest using CQL3, which I really
like for prototyping eg:

session.execute("INSERT INTO simplex.playlists (id, song_id, title, album,
artist) VALUES (1,1,'La Petite Tonkinoise','Bye Bye Blackbird','Joséphine

But for more complicated code this will quickly become unmanageable, and
doesn’t lend itself well to dynamically creating row data based on various
conditions. Is there a way to send a Java object, populated with the
desired column/value pairs, to the server instead of executing an insert
statement? Would this require some other library, or does the DataStax Java
driver support this already?

Thanks in advance,


View raw message