How can I add a new field/column in a Cassandra table with default value "whatever" ? I know how to add a new column, however, need it to be set to a certain value.
Asked
Active
Viewed 8,710 times
1 Answers
9
There is no cell default value in cassandra. Best option is to in your application identify null values and change it to the default.

Chris Lohfink
- 16,150
- 1
- 29
- 38
-
But then cassandra doesn't have a way to query for null values, you might have to just run across all rows before it gets updated and set default values. If you have, say million rows and you want to update 1000 at a time, then running the query will refetch already updated rows. – bschandramohan Feb 21 '20 at 06:47
-
@bschandramohan it's not like you add columns every day. it's a non-issue for me. – Buffalo Feb 24 '20 at 09:19