Skip to main content

Data Cubes

SQL Frames allows creating multi-dimensional data cubes. It supports Slicing, Dicing, Rollup, Drill Up/Down and Pivot operations of the Data Cube.

The advanced GROUP BY constructs ROLLUP and CUBE allow creating multiple levels of details at once. Hence, it is possible to create a single multi-dimensional cube that can then be sliced and diced as needed. There are multiple advantages with creating a data cube.

  1. They allow drilling up and down the hierarchies such as geography and time.
  2. Higher level values are computed from lower level details which are already aggregated and hence efficient to compute.
  3. Having multiple levels together allows complex visualizations such as pivot tables with sub-totals and static grid charts with multiple levels of details.
  4. Aggregation is relatively expensive and hence keeping pre-aggregated data allows projecting only the necessary slices for a given visual. The cost of aggregation is thus shared across several visuals.