What is an OLAP Cube?
When working with RevoGrid Enterprise Pivot, you will often hear the term OLAP (Online Analytical Processing) or OLAP Cube. While the name sounds complex, the concept is fundamental to modern business intelligence.
The “Cube” Metaphor
Section titled “The “Cube” Metaphor”In a traditional spreadsheet, data is 2-dimensional (Rows and Columns). In an OLAP Cube, data is Multidimensional.
Think of a “Cube” where each side represents a different category (a Dimension):
- Product (what we sold)
- Time (when we sold it)
- Geography (where we sold it)
Inside the cube, at the intersection of these three dimensions, lies the Measure (e.g., Sales Amount).
By “rotating” this cube, you can view the data from any angle. In RevoGrid Pivot, this “rotation” happens when you move fields between the Rows and Columns axes.
Core OLAP Operations
Section titled “Core OLAP Operations”OLAP cubes are designed to support four primary analytical operations, all of which are supported by RevoGrid:
1. Slicing
Section titled “1. Slicing”Slicing is like taking a single “slice” of the cube.
- Concept: Picking one value for a dimension.
- Example: “Show me sales only for the Year 2024.”
- In RevoGrid: This is achieved through Filtering.
2. Dicing
Section titled “2. Dicing”Dicing is like cutting a smaller “sub-cube” out of the big one.
- Concept: Picking specific values across multiple dimensions.
- Example: “Show me sales for Electronics in the North Region during Q1.”
- In RevoGrid: This is achieved by combining filters and row/column grouping.
3. Drill-Down / Drill-Up
Section titled “3. Drill-Down / Drill-Up”Moving through the levels of a hierarchy.
- Concept: Going from summarized data to detailed data (Drill-Down) or back (Drill-Up).
- Example: Looking at sales by Year, then clicking to see Quarters, then Months.
- In RevoGrid: Enabled via the
collapsedproperty in Drill-Down.
4. Pivoting (Rotating)
Section titled “4. Pivoting (Rotating)”Changing the orientation of the axes.
- Concept: Swapping Rows and Columns to see the data differently.
- Example: Moving “Region” from the Row axis to the Column axis to compare regions side-by-side.
- In RevoGrid: Performed via the Configurator or by updating the
rowsandcolumnsarrays in your code.
Why “Cube” vs. “Flat Table”?
Section titled “Why “Cube” vs. “Flat Table”?”| Feature | Flat Table (SQL) | OLAP Cube |
|---|---|---|
| Speed | Slow for large aggregations (calculates on the fly) | Fast (aggregations are often pre-calculated) |
| Complexity | Requires complex JOIN and GROUP BY logic | Logical, business-friendly dimensions |
| Scale | Hard to scale to billions of rows for real-time UI | Designed for massive analytical scale |
How RevoGrid Fits In
Section titled “How RevoGrid Fits In”RevoGrid acts as the Viewer for your OLAP data.
- Client-Side: RevoGrid builds a “virtual cube” in memory from your flat JSON data.
- Server-Side: RevoGrid communicates with a real OLAP engine (like Snowflake, ClickHouse, or Cube.js) using the Remote API.
Next Steps
Section titled “Next Steps”Now that you understand the “Cube” metaphor, learn how to prepare your data for these operations in Data Modeling for Pivot.