For the complete documentation index, see llms.txt. This page is also available as Markdown.

Classic Models

Workshop - Classic Models


  1. Ensure Pentaho Server is running:

Follow the guide below to understand how Classic Models Schema is defined:

Workflow to define a Schema

JDBC Connection

A JDBC (Java Database Connectivity) connection in Schema Workbench establishes the link between the tool and your source database, enabling you to access physical tables and columns needed to build Mondrian schemas.


Select the Pentaho User Console version:

Modern Design

  1. Log into the Pentaho Server Console (as Admin) > Data Connections.

Data Connections
  1. Click: + Add connection.

Data Connections - Hypersonic
  1. Click: Hypersonic - Connect

  2. In the Database Connection dialog, type or choose the following:

Field
Value

Connection name

hsqldb_sampledata

Connection type

Hypersonic

Host Name

localhost

Database Name

sampledata

Port Number

9001

Username

pentaho_admin

Password

password

  1. Scroll down & Click: Test connection

Test connection
Connection successful
  1. Click: Connect.

Connect
  1. The connection is added to the list.

Connection list

Classic Pentaho User Console

  1. Log into the Pentaho Server Console (as Admin) > Manage Data Sources.

Manage Data Sources
  1. From the drop-down co wheel, select: New Connection.

New Connection
  1. In the Database Connection dialog, type or choose the following:

Field
Value

Connection name

hsqldb_sampledata

Connection type

Hypersonic

Host Name

localhost

Database Name

sampledata

Port Number

9001

Username

pentaho_admin

Password

password

  1. Test the connection.

Connection - hsqldb_sampledata
  1. Click OK.

Classic Models Schema

The ClassicModelsOrders cube is a foundational multidimensional structure built in Schema Workbench that demonstrates core OLAP design principles using sales order data from the SampleData database.

At its center is the ORDERFACT fact table, which contains transactional sales data and serves as the source for quantitative measures such as Sales (aggregated as a sum of TOTALPRICE with currency formatting).

The cube includes two primary dimensions: the CUSTOMERS dimension, which provides a hierarchical view from Territory down to individual Customer Names using the CUSTOMER_W_TER table, and the PRODUCTS dimension, which organizes product data from Product Line through Vendor using the PRODUCTS table.

  1. Select: Semantic Model Editor.

+ Add New Model
  1. Click: + Add New Model & enter the following details:

Attribute
Value

Model Name

Classic Models

Data Connection

hsqldb_sampledata

Configure Model - Classic Models
  1. Click: Create Model.

  2. Drag & drop the following table onto the Canvas.

Table
Description

ORDERFACT

The FACT table. Steel WheelsInc. Sales data from FY2003_2005.

  1. Drag & drop the ORDERFACT table onto the 'Use as Fact table' option.

ORDERFACT

Cube Element

A cube, defined by a Cube XML element, is the context for a report or interactive analysis session. It represents a collection of events, describing the occurrences of a business process over the lifetime of the data mart.

Cubes tend to be a complete set of Dimensions, Hierarchies, Levels and Measures for doing an analysis on the set of events. For instance, if you’re interested in sales by customer, you might want to look at sales amounts (Measures) by customer (Dimension) geography (Level).

A cube collects these things into one place, ready for analysis and querying.

  1. Select: Model Structue tab to define the 'Cube 1'.

Edit Cube 1
  1. Enter the following details:

Attribute
Value

Mandatory

Cube name

Classic Models

Optional Information

Default Measure

Cache

true

Visible

true

Enabled

true

Describe Cube

Caption

Description

Steel Wheels Inc.Inc. Sales FY2003-2005

Cube Editor
  1. Click: Apply.

Configure Classic Models cube.

If you click on the 3 dots, you're able to:

  • Delete the cube

  • Add a Measure - i.e. Sales, Revenue, Quantity Sold, etc..

  • Add Degenerate Dimension - i.e. Order Status (metrics data thats residing in the FACT table).

  1. Click: Save.

  2. Click: Advanced tab to view XML.

XML

Measures

Measures in the ClassicModelsOrders cube are the quantitative, numeric facts that business users analyze and aggregate across different dimensional perspectives. The primary measure in this schema is Sales, which represents the total revenue from order transactions and is defined by mapping to the TOTALPRICE column in the ORDERFACT fact table. This measure uses the sum aggregator, meaning that sales values are added together when aggregated across any dimension - whether viewing total sales by Territory, Product Line, or any combination of dimensions.

The measure is configured with a formatString of $#,###.00, ensuring that sales figures display as properly formatted currency with dollar signs, thousand separators, and two decimal places for cents, making reports immediately readable and professional for business users.

The Numeric datatype ensures mathematical operations and aggregations are performed correctly. Measures are essential because they provide the "what we're measuring" in analytics - while dimensions answer "how we're grouping the data" (by customer, by product), measures answer "what values are we calculating and comparing" (sales revenue, quantities, counts), enabling users to track performance, identify trends, and make informed business decisions based on concrete numbers rather than subjective assessments.

  1. In the Model Canvas, Click: 3 dots > Add a Measure.

Add a Measure

Select metric type:

Simple Measure

  1. Select: 'Add Simple Measure' & Confirm.

Add Simple Measure
  1. Enter the following details:

Attribute
Value

Mandatory Information

Measure Name

Sales

Source Column

TOTALPRICE

Default Aggregation

Sum

Optional Information

Format

#,###.00

Visible

true

Data Type

Numeric

Describe Measure

Caption

Description

Steel Wheels Inc. Sales FY2003-2005

Configure Sales measure
  1. Click: Apply & Save.

Measures - Sales

Calculated Measure

Calculated measures are derived metrics defined within the OLAP semantic layer that combine, transform, or aggregate base measures to create business-critical analytics. Unlike base measures that directly represent data stored in source tables, calculated measures use MDX (Multidimensional Expressions) formulas to perform operations ranging from simple arithmetic - such as dividing Sales by Quantity to determine average unit price - to sophisticated analytical functions like identifying top-performing customer segments through ranking and aggregation.

By defining these calculations once within the Mondrian schema rather than recreating them in individual reports, organizations ensure consistent metric definitions across all analyses, eliminate calculation errors from redundant implementations, and embed business logic directly into the data model where it can be centrally maintained and automatically available to all report developers and end users.

  1. In the Model canvas, Click: (top right corner) Add a Measure.

Model Canvas - Add a Mwasure
  1. Select: 'Add Calculated Measure'.

Add Calculated Measure
  1. Click: Confirm.

  2. Enter the following details:

Attribute
Value

Mandatory Information

Measure Name

Unit Price

Formula

[Measures].[Sales] /

[Measures].[Quantity]

Optional Information

Format

$#,###.00

Visible

true

Parent

Describe Measure

Caption

Description

Unit Cost

Configure Calculated Measure - Unit Cost
  1. Click: Apply & Save.

x

x

x

x

x

Dimensions & Hierarchies

The Classic Models cube contains two standard dimensions that enable multidimensional analysis of sales data.

  1. Open: Classic Models

List of Models

Dimensions & Hierarchies

Dimension & Hierarchy

The CUSTOMERS dimension, linked to the fact table via the CUSTOMERNUMBER foreign key, provides a customer-focused analytical perspective through the "Customers" hierarchy, which includes two levels:

Territory (the top level, representing geographic sales regions with unique members) and

Customer Name (the detail level, displaying individual customer names).

  1. To create the CUSTOMERS dimension, drag & drop: CUSTOMERS_W_TER table onto the 'Use as Dimension' option for Classic Models.

CUSTOMERS Dimension
  1. Configure the CUSTOMERS dimension with the following details:

Attribute
Value

Dimension Name

Name

CUSTOMERS

Connect to the Fact Table

Column

CUSTOMERNUMBER

Dimension Type

Type

StandardDimension

Optional Information

Visible

true

Usage Prefix

Describe Dimension

Caption

Description

Geographical Customer data

Dimension Editor - CUSTOMERS
  1. Click: Apply & Save.


Customers Hierarchy

  1. To configure the Hierachy & Add the levels, Click on the 3 dots next to the Hierachy 1 panel.

Configure Customers Hiearchy
  1. Enter the following details:

Attribute
Value

Hierarchy Name

Name

Customers (lowercase)

Mandatory Data

Source Table

CUSTOMER_W_TER

Hierarchy Key

CUTOMERNUMBER

Has All

true

Optional Information

Visible

true

All Member Name

All Products

All Member Caption

All Level Name

Default Member

Member Reader Class

Origin

Display Folder

Unique Key Level Name

Level 1

Describe Hierarchy

Caption

Description

Customers Hierachy

Configure Customers Hiearchy
  1. Click: Apply & Save.

Configure Customers Hierarchy

Levels

Levels

Levels in the Classic Models schema serve as the building blocks of hierarchical navigation, enabling users to analyze sales data at different levels of granularity and detail. They organize information from broad categories to specific details, allowing business users to start with high-level summaries (such as total sales by Territory or Product Line) and progressively drill down into finer details (individual Customer Names or specific Vendors) to investigate patterns, identify trends, and answer detailed business questions.

Levels also define the aggregation behavior for measures, determining how sales figures are summarized and rolled up across the hierarchy - for instance, customer-level sales automatically aggregate to the Territory level, providing meaningful subtotals at each tier.

This hierarchical structure mirrors natural business thinking, where executives might analyze performance by region while sales managers focus on individual customer performance, making OLAP cubes intuitive and aligned with real-world decision-making processes.

  1. To configure the Territory Level, Click the 3 dots in the Level 1 panel.

Configure Level 1 - Territory
  1. Enter the following details:

Attribute
Value

Level Name

Name

Territory

Level Source

Source Table

CUSTOMER_W_TER

Column

TERRITORY

Relevant Information

Name Column

Ordinal Column

Optional Information

Visible

true

Aproximate Row Count

Null Parent Value

Key Column Type

Internal Type

Unique Members

true

Level Type

Regular

Hide Member If

Never

Formatter Class

Caption Column

Parent Column

Describe Level

Caption

Description

Customer geo.

Configure Territory Level
  1. Click: Apply & Save.


Its descision time ..

You could add a level: Customer Name .. however, this is really a Property of CUSTOMERS. So a more meaningful model would reflect the MARKETS - geo - that Steel Wheels Inc. operate in.

The MARKETS dimension would then enable the user to drill-down a geo hierarchy:

Markets

  • Territory

  • Country

  • State

  • City

and the CUSTOMERS dimension:

Customers

  • Customer Name

    • First Name

    • Last Name

    • Contact Name

    • eMail

    • Phone Number

  1. To add Customer Name as a Level, highlight Customers Hierarchy > Add New Level.

Add New Level
  1. Highlight the Level1 and enter the following details:

Attribute
Value

Level Name

Name

Customer Name

Level Source

Source Table

CUSTOMER_W_TER

Column

CUSTOMERNAME

Relevant Information

Name Column

Ordinal Column

Optional Information

Visible

true

Aproximate Row Count

Null Parent Value

Key Column Type

Internal Type

Unique Members

true

Level Type

Regular

Hide Member If

Never

Formatter Class

Caption Column

Parent Column

Describe Level

Caption

Description

Wholesale Buyer Name

Configure Customer Name Level
  1. Click: Apply & Save.

Customers Levels

Classic Models Test

  1. Create an Analyzer report based on the Classic Models: Classic Models data source.

Analyzer Report

Dimension & Hiearachy

The PRODUCTS dimension, connected through the PRODUCTCODE foreign key, organizes product information through the "Products" hierarchy with two levels:

Product Line (the top level, categorizing products into distinct product families with unique members such as Classic Cars, Motorcycles, and Planes) and

Vendor (the detail level, identifying the specific manufacturer or supplier of each product). Both dimensions follow a hierarchical structure from general to specific, allowing users to drill down from high-level categories (Territory or Product Line) to granular details (Customer Name or Vendor), with each level defined by specific database columns, data types (String), and uniqueness properties that determine aggregation behavior and query performance.

  1. To create the PRODUCTS dimension, drag & drop: PRODUCTS table onto the 'Use as Dimension' option for Classic Models.

PRODUCTS Dimension
  1. Configure the PRODUCTS dimension with the following details:

Attribute
Value

Dimension Name

Name

PRODUCTS

Connect to the Fact Table

Column

PRODUCTCODE

Dimension Type

Type

StandardDimension

Optional Information

Visible

true

Usage Prefix

Describe Dimension

Caption

Description

Steel Wheels Inc. Products

Configure PRODUCTS Dimension
  1. Click: Apply & Save.


Products Hierarchy

  1. To configure the Hierachy & Add the levels, Click on the 3 dots next to the Hierachy 1 panel.

Configure Products Hierarchy
  1. Enter the following details:

Attribute
Value

Hierarchy Name

Name

Products (lowercase)

Mandatory Data

Source Table

PRODUCTS

Hierarchy Key

PRODUCTCODE

Has All

true

Optional Information

Visible

true

All Member Name

All Customers

All Member Caption

All Level Name

Default Member

Member Reader Class

Origin

Display Folder

Unique Key Level Name

Level 1

Describe Hierarchy

Caption

Description

Customers Hierachy

Configure Products Hiearchy
  1. Click: Apply & Save.

Configure Products Hierarchy

Levels

Levels

Levels in the Classic Models schema serve as the building blocks of hierarchical navigation, enabling users to analyze sales data at different levels of granularity and detail. They organize information from broad categories to specific details, allowing business users to start with high-level summaries (such as total sales by Territory or Product Line) and progressively drill down into finer details (individual Customer Names or specific Vendors) to investigate patterns, identify trends, and answer detailed business questions.

Levels also define the aggregation behavior for measures, determining how sales figures are summarized and rolled up across the hierarchy - for instance, customer-level sales automatically aggregate to the Territory level, providing meaningful subtotals at each tier.

This hierarchical structure mirrors natural business thinking, where executives might analyze performance by region while sales managers focus on individual customer performance, making OLAP cubes intuitive and aligned with real-world decision-making processes.

  1. To configure the Territory Level, Click the 3 dots in the Level 1 panel.

Configure Level 1 - Territory
  1. Enter the following details:

Attribute
Value

Level Name

Name

Territory

Level Source

Source Table

CUSTOMER_W_TER

Column

TERRITORY

Relevant Information

Name Column

Ordinal Column

Optional Information

Visible

true

Aproximate Row Count

Null Parent Value

Key Column Type

Internal Type

Unique Members

true

Level Type

Regular

Hide Member If

Never

Formatter Class

Caption Column

Parent Column

Describe Level

Caption

Description

Customer geo.

Configure Territory Level
  1. Click: Apply & Save.


Its descision time ..

You could add a level: Customer Name .. however, this is really a Property of CUSTOMERS. So a more meaningful model would reflect the MARKETS - geo - that Steel Wheels Inc. operate in.

The MARKETS dimension would then enable the user to drill-down a geo hierarchy:

Markets

  • Territory

  • Country

  • State

  • City

and the CUSTOMERS dimension:

Customers

  • Customer Name

    • First Name

    • Last Name

    • Contact Name

    • eMail

    • Phone Number

  1. To add Customer Name as a Level, highlight Customers Hierarchy > Add New Level.

Add New Level
  1. Highlight the Level1 and enter the following details:

Attribute
Value

Level Name

Name

Customer Name

Level Source

Source Table

CUSTOMER_W_TER

Column

CUSTOMERNAME

Relevant Information

Name Column

Ordinal Column

Optional Information

Visible

true

Aproximate Row Count

Null Parent Value

Key Column Type

Internal Type

Unique Members

true

Level Type

Regular

Hide Member If

Never

Formatter Class

Caption Column

Parent Column

Describe Level

Caption

Description

Wholesale Buyer Name

Configure Customer Name Level
  1. Click: Apply & Save.

Customers Levels

Classic Models Test

  1. Create an Analyzer report based on the Classic Models: Classic Models data source.

Analyzer Report

Last updated

Was this helpful?