Live data from Hacker News

What Is an OLAP Cube? An Exhaustive Explainer

holistics.io

1–10 of 21 posts

Re: What Is an OLAP Cube? An Exhaustive Explainer

#3
If you've used pivot tables in Excel or Google Sheets, you'll know that you have:

A) rows and columns

B) values

Dimensions are things you might include in A.

Facts (or measures) are things you can aggregate, and would be part of B.

In the old days, you often couldn't quickly (on demand) compute the answer to a question, due to memory and processing limitations.

But, if you could decide ahead of time what dimensions and facts you wanted, you could compute all the little slices, e.g. value of sales in the north region by salesperson Bob in month July 1996.

Then, when you needed some particular pivot table, your software could provide it to you just by summing these precomputed slices.

The OL in OLAP stands for 'online', i.e. you'd do your analytical processing ('AP') live, rather than waiting for some long-running batch job.

Re: What Is an OLAP Cube? An Exhaustive Explainer

#4
people can really get hung up on jargon like this. the real concept is dimensional modeling which is a whole strategy and toolkit of ideas for doing online analytical processing. you can do it with anything, the data warehouse toolkit was calling it "rowlap" when you did in a regular database. you would be dead lost trying to use a proper "olap" tool with special sparse matrix data structures and MDX queries without understanding concepts like the various types of dimension tables and how they can be nested etc. Claire was basically right but maybe actually complaining more about the marketing of the olap products than any actual gatekeeping.

Re: What Is an OLAP Cube? An Exhaustive Explainer

#6
OLAP database is just a copy, replica, or archive of data with a schema designed for analytical queries and not for transactional speed and robustness.

Cube means you can answer questions across dimensions of time, region, and the like. Temporal queries are not always simple.

You don't query your live transactional db to answer a question like, "are third week of February margins on Acme Widget Q better in place A or B."

That's really it.

Re: What Is an OLAP Cube? An Exhaustive Explainer

#10

Is there any advantage to OLAP cube over plain SQL (large historical database regularly updated with production data)? It sounds like certain common queries may be extra fast as it's kind of pre-computed?

Depends if you want to go the vendor route, where "cube" is very specific to the implementation of the tool you're implementing. Dealing with semi-additive measures and drill-down/drill-through will differ between SSAS, Pentaho, or Cognos.

I think the real value in the process comes from all the data modeling decisions, which involves a lot of interactions with the business users that are asking for data/reports. Something as simple as an e-commerce order can look very different between CEO KPI reports, marketing, purchasing, and accounting. For example, accounting cares only when the product ships while marketing cares when it's sold. Multiply this by a hundred, and you end up with nuanced data pipelines that encapsulate all this domain-specific logic.

Multidimensional modeling is very useful even if you're not adopting cubes specifically, and just using dbt on a read-only replica of your database to create aggregate table for a few dozen reports.

Post reply on HN