Creating a semantic model
Create a semantic model to organize physical data into a multi-dimensional structure. Use semantic models to analyze data and support business decisions.
Note: Only JDBC connections are supported.
In this topic
Create a basic semantic model
Create a basic semantic model with the minimum information. Provide a model name and physical data connection details.
Complete the following steps to create a basic semantic model:
Sign in to the Pentaho User Console (PUC).
Open the Semantic Model Editor:
If you are using the Modern Design, in the left menu, click Semantic Model Editor.
If you are using the Classic Design, click File > Semantic Model Editor.
The Semantic Model Editor opens.
Click + Add New Model.
Enter a unique Model Name.
Select the data connection to use:
Existing Data Connection
Select the connection from the Data Connection list.
(Optional) Add parameters. Turn on Add parameters?. Click Add+ for each parameter row. Enter a Name and Value for each parameter.
Use parameters to configure Mondrian model processing, JDBC, or dynamic values. The following names are reserved and cannot be used:
Provider,Jdbc,JdbcDrivers,JdbcUser,JdbcPassword,Catalog,CatalogContent,CatalogName,DataSource, andDataAccessNotListedCatalog.
New Data Connection
Important: A data connection added during model creation is exclusive to that model. You cannot reuse it elsewhere in the product.
Select New Data Connection.
Enter connection information:
URL (required): URL of the data connection.
Driver: Driver needed to access the data connection.
User (required): User name for the data connection.
Password: Password for the data connection.
(Optional) Add parameters. Turn on Add parameters?. Click Add+ for each parameter row. Enter a Name and Value for each parameter.
Use parameters to configure Mondrian model processing, JDBC, or dynamic values. The following names are reserved and cannot be used:
Provider,Jdbc,JdbcDrivers,JdbcUser,JdbcPassword,Catalog,CatalogContent,CatalogName,DataSource, andDataAccessNotListedCatalog.(Optional) Click Test Connection.
Click Create Model.
The semantic model is created and opened in the canvas.
What to do next: Create a cube with fact tables, dimensions, and measures.
Create a cube in a semantic model
Create a cube with a fact table, dimensions, and measures. The cube contains aggregated data from a semantic model’s physical connection.
You can create a new cube by dragging a view or table onto a blank area of the canvas. Then select how to use it.
Note: When you drag a view or table onto the canvas, you can also create a shared dimension. For details, see Create a shared dimension.
In this topic
Add a fact table to a cube
Add a fact table that contains the data you want aggregated in the cube. You can create a new cube or add the fact table to an existing cube.
Notes:
A cube can have only one fact table.
Using an inline table as a fact table is supported only in Advanced mode. For details, see Advanced mode.
Complete the following steps to add a table or view as a fact table:
Sign in to the Pentaho User Console (PUC).
Open the Semantic Model Editor:
If you are using the Modern Design, in the left menu, click Semantic Model Editor.
If you are using the Classic Design, click File > Semantic Model Editor.
The Semantic Model Editor opens.
Open the semantic model you want to update:
In the Semantic Models list, find the model.
Click Open.
In the Data Source tab, find the table or view you want.
(Optional) Click Preview next to the table or view.
Note: You can preview one table or view at a time. The default maximum rows shown is 100. Administrators can change the
row-limitproperty inapplication.properties. The file is in\Pentaho\server\pentaho-server\pentaho-solutions\system\semantic-model-editor. Restart the server to apply the change.Add the table or view as a fact table:
For an existing cube without a fact table, drag the table or view onto the cube. When Do you want to: opens, drop it on Use as Fact Table.
To create a new cube, drag the table or view onto a blank canvas area. When Do you want to: opens, drop it on Use as Fact Table.
(Optional) If you created a new cube, rename it.
Note: The default cube name is “Cube” plus a number. Example:
Cube 3.Click Save.
Add a dimension to a cube
Add a dimension so users can group data for analysis. You can create a new cube or add the dimension to an existing cube.
Complete the following steps to add a table or view as a dimension:
Sign in to the Pentaho User Console (PUC).
Open the Semantic Model Editor:
If you are using the Modern Design, in the left menu, click Semantic Model Editor.
If you are using the Classic Design, click File > Semantic Model Editor.
The Semantic Model Editor opens.
Open the semantic model you want to update:
In the Semantic Models list, find the model.
Click Open.
In the Data Source tab, find the table or view you want.
(Optional) Click Preview next to the table or view.
Note: You can preview one table or view at a time. The default maximum rows shown is 100. Administrators can change the
row-limitproperty inapplication.properties. The file is in\Pentaho\server\pentaho-server\pentaho-solutions\system\semantic-model-editor. Restart the server to apply the change.Add the table or view as a dimension:
For an existing cube, drag the table or view onto the cube. When Do you want to: opens, drop it on Use as Dimension.
To create a new cube, drag the table or view onto a blank canvas area. When Do you want to: opens, drop it on Use as Dimension.
A dimension is created and the Dimension Editor opens.
In Dimension Name, enter a unique Name within the cube.
(Optional) If the dimension is not linked to a fact table, connect it:
Note: If the cube does not have a fact table, add one first. See Add a fact table to a cube.
In Dimension Type, select the dimension type.
(Optional) Configure Optional Information and Describe Dimension.
In the dimension tree, select the hierarchy.
Note: You can add more than one hierarchy to a dimension.
Configure the hierarchy, then select the level.
Note: You can add more than one level to a hierarchy.
Configure the level, then click Apply.
(Optional) If you created a new cube, rename it.
Click Save.
Add a measure to a cube
Add a measure to quantify cube data. Measures support operations like slicing, dicing, and drilling down.
Note: The cube must have a fact table before you can add a measure.
Complete one of the following procedures:
Add a simple measure to a cube
Add a simple measure based on a column in the cube’s fact table.
Sign in to the Pentaho User Console (PUC).
Open the Semantic Model Editor.
Open the semantic model that contains the cube.
Select the cube, then click Add a Measure.
Note: If Add a Measure is not visible, click More Actions. Then select Add a Measure.
Select Add Simple Measure, then click Confirm.
Enter values in Mandatory Information.
(Optional) Configure Optional Information and Describe Measure.
Click Create.
Click Save.
Add simple measures in bulk to a cube
Create multiple simple measures at once by selecting columns and an aggregation.
Sign in to the Pentaho User Console (PUC).
Open the Semantic Model Editor.
Open the semantic model that contains the cube.
Select the cube, then click Add a Measure.
Note: If Add a Measure is not visible, click More Actions. Then select Add a Measure.
Select Add Simple Measure, then click Confirm.
Select Bulk Measures.
(Optional) Turn on Use Custom Name to add a prefix or suffix.
Configure the criteria and aggregation.
Click Create.
Click Save.
Add a calculated measure to a cube
Add a calculated measure using an MDX formula.
Sign in to the Pentaho User Console (PUC).
Open the Semantic Model Editor.
Open the semantic model that contains the cube.
Locate the cube, then click Add a Measure.
Notes:
If Add a Measure is not visible, click More Actions. Then select Add a Measure.
To find elements in large models, use the Model Structure tab.
Select Add Calculated Measure, then click Confirm.
Enter values in Mandatory Information.
(Optional) Configure Optional Information and Describe Measure.
Click Create.
Click Save.
Add a measure created with SQL to a cube
Add a measure using an SQL expression that references multiple tables or views.
Sign in to the Pentaho User Console (PUC).
Open the Semantic Model Editor.
Open the semantic model that contains the cube.
Locate the cube, then click Add a Measure.
Notes:
If Add a Measure is not visible, click More Actions. Then select Add a Measure.
To find elements in large models, use the Model Structure tab.
Select Add with SQL, then click Confirm.
Enter values in Mandatory Information.
(Optional) Configure Optional Information and Describe Measure.
Click Create.
Click Save.
Add a degenerate dimension to a cube
Add a degenerate dimension when you want to describe aggregated data using only the fact table.
Note: The cube must have a fact table before you can add a degenerate dimension.
Sign in to the Pentaho User Console (PUC).
Open the Semantic Model Editor.
Open the semantic model that contains the cube.
Locate the cube, then click Add a Degenerate Dimension.
Notes:
If the icon is not visible, click More Actions. Then select Add a Degenerate Dimension.
To find elements in large models, use the Model Structure tab.
Configure the degenerate dimension, hierarchy, and level.
Click Apply.
Click Save.
Use a shared dimension in a cube
Use a shared dimension to keep dimensions consistent across cubes.
Sign in to the Pentaho User Console (PUC).
Open the Semantic Model Editor.
Open the semantic model you want to update.
Locate the shared dimension and the cube.
Note: To find elements in large models, use the Model Structure tab.
Drag the shared dimension onto the cube. When Do you want to: opens, drop it on Use as Dimension.
Enter a unique Name for the dimension usage.
Configure required fields, then click Apply.
Click Save.
Create a shared dimension
Create a shared dimension for aggregated data you want to reuse across cubes. For example, create a shared time dimension and use it in several cubes.
Complete the following steps to add a table or view as a shared dimension:
Sign in to the Pentaho User Console (PUC).
Open the Semantic Model Editor:
If you are using the Modern Design, in the left menu, click Semantic Model Editor.
If you are using the Classic Design, click File > Semantic Model Editor.
The Semantic Model Editor opens.
Open the semantic model:
In the Semantic Models list, find the model.
Click Open.
In the Data Source tab, find the table or view you want.
(Optional) Click Preview next to the table or view.
Note: You can preview one table or view at a time. The default maximum rows shown is 100. Administrators can change the
row-limitproperty inapplication.properties. The file is in\Pentaho\server\pentaho-server\pentaho-solutions\system\semantic-model-editor. Restart the server to apply the change.Drag the table or view onto a blank canvas area. When Do you want to: opens, drop it on Use as Shared Dimension.
The Shared Dimension Editor opens.
Configure the shared dimension, hierarchy, and levels.
Click Apply, then click Save.
Last updated
Was this helpful?

