Dear Wiki user, You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for change notification.
The "CassandraCli" page has been changed by MichaelArtemiw. The comment on this change is: I wasted a lot of time because I didn't see the note. My suggestion is that the intended audience for "getting started" is more likely to be running the current stable build 0.6.8.. http://wiki.apache.org/cassandra/CassandraCli?action=diff&rev1=19&rev2=20 -------------------------------------------------- As the banner says, you can use 'help' or '?' to see what the CLI has to offer, and 'quit' or 'exit' when you've had enough fun. But lets try something slightly more interesting... {{{ + [t...@keyspace1] set Keyspace1.Standard2['jsmith']['first'] = 'John' + Value inserted. + [t...@keyspace1] set Keyspace1.Standard2['jsmith']['last'] = 'Smith' + Value inserted. + [t...@keyspace1] set Keyspace1.Standard2['jsmith']['age'] = '42' + Value inserted. + }}} + + Cassandra 0.7 introduces the `use` command to reduce keystrokes. The above example can be reduced to... + + {{{ [defa...@unknown] use Keyspace1 todd 'blah$' Authenticated to keyspace: Keyspace1 [t...@keyspace1] set Standard2['jsmith']['first'] = 'John' @@ -37, +48 @@ [t...@keyspace1] set Standard2['jsmith']['age'] = '42' Value inserted. }}} - '''''Note:''''' ''the `use` command above is only available in Cassandra 0.7 and later. You can skip it if you are using an earlier version.'' In the example above we authenticated to 'Keyspace1' and created a record in the `Standard1` column family using the key `jsmith`. This record has three columns, `first`, `last`, and `age`. Each of these commands is the equivalent to an `insert()` using the [[API|Thrift API]].
