hey , ALL,
It's my experience for Build up OLAP Templates By Business Models - SpagoBI Studio 4.1.
ONE Cube With Multiple dimensions.In this case , some columns in the cube are code value, so it need the dimensions to get full description.
1. Create Database Connection:
1.1 Find the Data Source Explore. if You can't get this window, you can find it from [Windows > Show View > Data Source Explore].
1.2 New Database Connections.
2. New model on Business Models:
2.1 Create A new SpagoBI Model
2.2 Select Connection and chose the Schema
2.3 Select Tables for Physical Model Tables (Please only select the fact table & dimension table)
2.4 Select Business Model Classes form Physical Model Tables
2.5 Create the Table to Cube/ Dimension on Business model window.
(Chose the Table and click right mouse button, you can find the Olap option > select Create Cube or Dimension)
2.6 You should set the Hierarchy on the Dimension Table.
Step 1. Chose the Dimension Table and click right mouse button, you can find the Olap option and Edit Hierarchy
Step 2. Add Hierarchy and drag the column you want to be hierarchy it will map the cube code value and chose the Name Column for display description.
2.7 Add measure on Cube Table.
Step 1. Click the Cube Table for get the detail info and you will see the Attributes
Step 2. Click the Attributes and find which Column you want add the measure it.
Step 3. Click right mouse button on the Column , you can find the Olap option > Add Measure.
2.8 Add relationship between Cube and Dimension.
Step 1. Click right mouse button on the Business Model and you can find the Edit option > Add relationship .
Step 2. Source Business Class is Cube table and Target Business Class is Dimension table.
Step 3. Chose their Column and relationship.
2.9 Create Mondrian Template.
Step 1. Click right mouse button on the Business Model and you can find the Create option > Mondrian Template.
3. Deployment OLAP Templates to Service:
3.1 Please confirm you add the server on the Resource item.
3.2 Chose the template you create by [New model on Business Models] and click right mouse button you will find the Deployment OLAP Templates.
* Dimension table don't set Primary key, you will find exception in spagoBI.
1. Click the template you create by [New model on Business Models].
2. Find the Dimension and the attribute [primaryKey]'s value, modify it to which Column you want map to cube. ** Column need CAPITAL