Hi as I am new to Cassandra I am reading some books, docs, and blog posts to get myself familiar with it. Now I would like to get some answer to how to implement "Accumulating Materialized Views In Cassandra" and by that I mean : Suppose that we have the following model Game { userId, gameName, time,gameMoney .... , etc. } If I want to "Aggregate" games by userId, gameName, I will need denormalize the table to some Materialized View, where the same data is stored but in different model.
What I want is when some record is inserted into the first table a record is inserted in the materialized view or it is update and accumulated if exist.
For example :
Game { 1,gameOne,12:00,1.2}
Game {1, gameTwo, 12:00, 2.3}
Game {1,gameTwo,11:00, 2.3}
In the denormalized Materialized View, I want to have two record ( an aggregation by userId and game name) that will look like
UserGames { 1,gameOne,1.2 }
UserGames {1,gameTow, 4.6 }
I know about triggers but curious if there are some other ways to accomplish that ?
Aggregating materialized views are still not implemented. Here is the relevant Jira ticket and a video explaining how the feature would look like.
Depending on how much data you'll have, you could consider using aggregates.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With