Paul Knopf
Paul Knopf

Reputation: 9776

Cassandra: Adding new denormalized query tables for existing keyspace/data

From the beginning of an application, you plan ahead and denormalize data at write-time for faster queries at read-time. Using Cassandra "BATCH" commands, you can ensure atomic updates across multiple tables.

But, what about when you add a new feature, and need a new denormalized table? Do you need to run a temporary script to populate this new table with data? Is this how people normally do it? Is there a feature in Cassandra that will do this for me?

Upvotes: 1

Views: 238

Answers (1)

deejbee
deejbee

Reputation: 1228

I can't comment yet hence the new answer. The answer is yes, you'd have to write a migration script and run that when you deploy your software upgrade with the new feature. That's fairly a typical devops release process from my experience.

I've not seen anything like Code First Migrations (for MS SQL Server & Entity Framework) for Cassandra, which does the migration script automatically for you.

Upvotes: 1

Related Questions