Reputation: 223
I need to change(to update it with new value) the key of row in cassandra. How can i do that? Of course i can select all rows with previos key and then insert their columns with new key, and delete the previos rows. this is too hard. maybe there is another way to solve this prolem?
Upvotes: 4
Views: 1351
Reputation: 5432
What you could do is copy the entire row and insert it again with your new row key.
Upvotes: 2
Reputation: 1787
Unfortunately you can't change the key of a row - that would incur too much overhead (for example, you might have to move the row to a different host).
Upvotes: 2