Data Model

Creating a model from various Data Sources ..

Workshop - Data Model

Data Source Wizard

When you first open the model editor, the centre pane of the dialog box displays the active model. This model is organized into categories and fields that represent the tables and columns in your data.

  • Creating a data source from a CSV file treats all columns as if they are in a single table, with no limitations on where measures come from or which fields can be grouped in a hierarchy.

  • Creating a data source from a database table for Reporting and Analysis requires you to specify a fact table. Only numeric columns from the fact table can be used as measures. Also, all levels in a single hierarchy must come from the same dimension table.

  • If you add or edit annotations on the data model in Analyzer, these annotations will not be visible when viewing the model in the Data Source Wizard. For example, if you add a calculated measure to the model in Analyzer, it will not display in the list of measures when viewing the model in DSW. Saving the model in DSW will overwrite any annotations which were added to the model in Analyzer.


Launch the Data Source Wizard

  1. Log into the Pentaho User Console:

User: Admin

Password: password

  1. Click Create New > Data Source or access from Manage Data Sources.

New Data Source

Select the model Data Source:

CSV File

Model from CSV file
  1. Download the Checkbook.csv file:

  1. Enter Data Source Name: Checkbook

Provide a descriptive name (avoid special characters: / \ : * ? " < > |)

  1. Select CSV File as Source Type.

  2. Click Import and browse to select your CSV file.

DSW - Import Checkbook_data.csv
  1. Configure the following CSV properties:

Property
Value

Data Source Name

Checkbook

Source Type

CSV File

File

/Downloads/Checkbook_data.csv

Encoding

ISO-8859-1

Delimiter

Comma

Enclosure

Double Quote

DSW - Configure Data Source
  1. Preview and Verify.

  2. Click Next to Continue.

The Staging Settings screen displays a list of columns from your CSV source file. All columns are enabled.

DSW - Staging
  1. Edit the following properties:

Name
Type
Source Format
Length
Precision

Date

STRING

15

0

Description

STRING

50

0

Category Desc

STRING

50

0

Category

STRING

5

0

Amount

NUMERIC

#,##0.00

10

2

  1. Click: Show File Contents.

File Preview
  1. Click Finish.

  2. Choose Model Option: Customize model now

Keep default model - Uses the data source as-is

Customize model now - Opens Data Source Model Editor for refinement


Select a reporting option:

Configure Model for Interactive & Analyzer reports

Interactive Reporting

Notice that the Wizard puts all the columns in one category. You can use the toolbar buttons to easily create additional categories and move the columns up and down to organize the columns into categories.

  1. On the Reporting tab, click the Check book category.

  2. In the Properties pane, click in the Category Name field.

  3. Rename: Checkbook Category.

DSW - Edit Display Name
  1. Format the Amount: #.#

  1. Click OK.


  1. From the User Console Home Perspective, click Create New > Interactive Report.

  2. In the Select Data Source window, click Checkbook, and then click OK.

Data Source - Checkbook
  1. On the Data tab, notice the Checkbook Category name.

Checkbook Report

If this is the first time you are using Interactive Reporting, you may need to click the Get Started button, and then click to Hide Tips.

  1. Add Category Desc, on the Data tab, double-click Category Desc.

  2. Add Date, on the Data tab, double-click Date.

  3. Add Amount, on the Data tab, double-click Amount.

Last updated

Was this helpful?