Reputation: 5808
We are using Cassandra for OLTP DB, storing DB transactions, and evaluating requirements for reporting solution.
We are evaluating using Cassandra for reporting database with flattened schema.
What are the advantages/ pitfalls for using Cassandra as reporting DB?
Upvotes: 9
Views: 5058
Reputation: 1480
Cassandra has no joins and aggregations, though there are UDAFs (https://docs.datastax.com/en/cql/3.3/cql/cql_using/useCreateUDA.html), but in my opinion they are quite restricting. So depend on your usage, if you are looking for something that will allow you flexibility in your queries - c* is not the answer (e.g. ad-hoc queries by analysts), as you will always need client side join and aggregations. For pre-defined reports, I guess it could work. But you should be extremely careful of skewness of partitions...
Upvotes: 2
Reputation: 133
In Cassandra you should almost everytime create a new table for a new query. So, making your decision really depends on the number of different report queries you are going to develop. If you have many different queries for your reports, you will probably end up maintainig many Cassandra tables.
Also, you should consider the how these reports change over time. If report queries changes rapidly, you may need to create new Cassandra tables for these changes. You may need to move data from old Cassandra tables to new Cassandra tables. For these types of tasks, you will need to run Spark jobs on Cassandra nodes. So you will also need to learn and maintain Spark code.
Upvotes: 2
Reputation: 2374
It's recommended to consider using Spark in conjunction to Cassandra for OLAP.
Here is a related post on stackoverflow:
Is Cassandra for OLAP or OLTP or both?
Here is a presentation for similar use case: https://www.slideshare.net/EvanChan2/breakthrough-olap-performance-with-cassandra-and-spark
Upvotes: 8