Database Reference
In-Depth Information
[default@MyKeyspace] count User['ehewitt']
2 columns
Now that we know the data is there, let's read it, using the get command:
[default@MyKeyspace] get User['ehewitt']
=> (column=666e616d65, value=Eben, timestamp=1282510290343000)
=> (column=656d61696c, value=me@example.com, timestamp=1282510313429000)
Returned 2 results.
You can delete a column using the del command. Here we will delete the email column for the
ehewitt row key:
[default@MyKeyspace] del User['ehewitt']['email']
column removed.
Now we'll clean up after ourselves by deleting the entire row. It's the same command, but we
don't specify a column name:
[default@MyKeyspace] del User['ehewitt']
row removed.
To make sure that it's removed, we can query again:
[default@Keyspace1] get User['ehewitt']
Returned 0 results.
Summary
Now you should have a Cassandra installation up and running. You've worked with the CLI client
to insert and retrieve some data, and you're ready to take a step back and get the big picture on
Cassandra before really diving into the details.
Search WWH ::




Custom Search