Question

I have a row with multiple simple columns and i need to delete only the columns in the row without deleting the row key itself.

I tried using remove('row key') but it deletes the row key itself. How do i use the remove() function to remove all columns in a row?

Was it helpful?

Solution

There is no actual row object in Cassandra - rows don't exist themselves, they are just containers for columns. When querying, you can't tell the difference between a row with deleted columns and a row that never existed. So remove('row key') is doing exactly what you need to delete all columns in a row.

However, during range slice queries, you might see the row tombstone object - see http://wiki.apache.org/cassandra/FAQ#range_ghosts. This is a temporary object though and must not be used by applications to indicate anything.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top