Using Cassandra for OLAP
Asked Answered
C

3

9

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?

Crat answered 8/1, 2018 at 19:1 Comment(0)
C
8

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

Career answered 9/1, 2018 at 6:13 Comment(1)
It's only recommended to separate OLAP & OLTP servers into separate data centers.Regine
C
2

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.

Cynde answered 9/1, 2018 at 7:32 Comment(0)
F
2

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...

Footplate answered 18/1, 2018 at 14:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.