olap solutions using pentaho analysis services
TRANSCRIPT
![Page 1: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/1.jpg)
OLAP Solutions usingPentaho Analysis Services
Gabriele Pozzani
![Page 2: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/2.jpg)
PAS
● Pentaho Analysis Services (PAS) provides– OLAP capabilities– To interactively analyze data through a cross-tab
interface– No need to define a query– A front-end provides the interface to retrieve and
format data● Drill-down● Drill-up● Slicing● Dicing
![Page 3: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/3.jpg)
PAS components (I)
● PAS consists of four components
1. Mondrian OLAP Engine: receives MDX queries from JPivot and returns a multi-dimensional result-set
• Included in the Pentaho Server
2. Schema Workbench: designes and tests Mondrian cube schemas• Cubes are used by Mondrian to interpret MDX and
translate it into SQL queries on a RDBMS
![Page 4: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/4.jpg)
PAS components (II)
3. JPivot analysis front-end: a Java-based analysis tool. Front-end for OLAP cubes
4. Aggregate designer: a designer for generating aggregate tables to speed up the analytical engine
![Page 5: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/5.jpg)
![Page 6: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/6.jpg)
Schemas
● Mondrian Schemas are XML documents– Describe multidimensional cubes– Describe the mapping between multi-dimensional
and relational model– Is used to translate MDX to SQL
![Page 7: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/7.jpg)
MDX
● MDX: Multi-Dimensional eXpressions– A language designed for querying OLAP databases– A de facto standard developed by Microsoft
http://msdn.microsoft.com/en-us/library/ms145506.aspx
![Page 8: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/8.jpg)
Pentaho Schema Workbench
![Page 9: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/9.jpg)
Pentaho Schema Workbench
● PSW is a graphical tool– To create Mondrian schemas– To publish schemas to the Pentaho Server
![Page 10: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/10.jpg)
Connect to DB
● The first thing to do is to establish a connection to the database– Options →
Connections...
![Page 11: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/11.jpg)
JDBC Explorer
● Once the connection has been established you can explore the database– File New JDBC Explorer→ →
![Page 12: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/12.jpg)
Create a new schema
● The schema editor can:– Create a new schema
● File New Schema→ →
– Save the schema on disk● .xml
– Edit object attributes– Switch to view the XML representation of the
schema● Only view. No editing
![Page 13: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/13.jpg)
Main tasks
● Basic tasks for defining a schema are:
1. Create a schema
2. Create cubes2.1. Choose a fact table
2.2. Add measures
3. Create dimensions3.1. Edit the default hierarchy and choose a dimension
table
3.2. Define hierarchy levels
4. Associate dimensions with cubes
![Page 14: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/14.jpg)
1. Create a schema
● File New Schema→ →
![Page 15: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/15.jpg)
2. Create cubes
●
2.1 !!!
![Page 16: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/16.jpg)
2.1. Choose a fact table
DB Schema
Table namein the schema
![Page 17: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/17.jpg)
2.2. Add measures
●
![Page 18: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/18.jpg)
3. Create dimensions (I)
● Dimensions can be added to:– A cube: "private dimensions" known only to the
cube that contains them– A schema: "shared dimensions" that can be
associated to multiple cubes
![Page 19: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/19.jpg)
3. Create dimensions (II)
Fact tableforeign key
● Date/time related dim.has TimeDimension type
![Page 20: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/20.jpg)
3. Create dimensions (III)
Usual dimensions haveStandardDimension type
3.1 !!!
![Page 21: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/21.jpg)
3.1. Add/edit hierarchies● A new hierarchy is created for each dimension● New hierarchies can be added to dimensions● Each hierarchy must have a table node and one
or more levels
![Page 22: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/22.jpg)
3.1. Dimension table
● Same settings for fact tables
![Page 23: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/23.jpg)
3.2. Add hierarchy levels
●
![Page 24: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/24.jpg)
4. Associate shared dimensions
● Shared dimensions can be associated to a cube adding a "Dimension usage"
●
Shared dim.
![Page 25: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/25.jpg)
Testing and deployment
● Once schemas have been defined they may be– Tested using the MDX query tool (MDX) included in
PSW– Published to the Pentaho Server
![Page 26: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/26.jpg)
MDX query tool (I)
● File New MDX Query→ →● If a schema editor is open MDX attempts to
connect to the underlying DB for loading the schema definition
![Page 27: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/27.jpg)
MDX query tool (II)
● A query can be entered in the upper pane
● The result is shown in the lower pane
![Page 28: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/28.jpg)
Publishing the cube (I)
● File Publish...→
Server URL
Password specified inpublisher_config.xml
User with privilegesfor publishing
![Page 29: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/29.jpg)
Publishing the cube (II)
● If the connection succeeds a dialog appears– Choose the location in
the server's solution repository where to save the schema
– Specify the data source to use at the server side to execute the SQL queries (corresponding to the MDX ones)
![Page 30: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/30.jpg)
JPivot
![Page 31: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/31.jpg)
JPivot
● Once a cube has been published it can be used to build analysis applications
● Pentaho provides the JPivot front-end in the Pentaho User Console
![Page 32: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/32.jpg)
Analysis View
![Page 33: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/33.jpg)
Create a new analysis view
Schema to use
Cube to use definedinto the schema
![Page 34: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/34.jpg)
New analysis view
JPivot toolbar
![Page 35: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/35.jpg)
Drilling
● Drilling allows the user to navigate from one level of aggregation to another
![Page 36: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/36.jpg)
Drilling flavors
● There are 4 different ways to drill, with different drill result
● Different drill ways can be selected in the toolbar– Drill member– Drill position– Drill replace– Drill through
Apply to dimensions
Apply to measures
![Page 37: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/37.jpg)
Drill member & Drill position
● Drill member: the drilling on one instance of a member is also applied to all other instances of this member
● Drill position: the drilling occurs directly to the member instance and it is not applied to other instances of that member
![Page 38: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/38.jpg)
Drill replace
● The drilled member is replaced with the drill result
![Page 39: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/39.jpg)
Drill through
● It applies to measures● It retrieves the detail rows of the rolled up
measure aggregate value and shows them in a separate table
![Page 40: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/40.jpg)
The OLAP Navigator (I)
● It is a GUI that allows to control the mapping between the cube and the pivot table– Which dimension is mapped to which axis– How multiple dimensions on one axis are ordered– What slice of the cube
is used in analysis
![Page 41: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/41.jpg)
The OLAP Navigator (II)
● The navigator has three sections– A Columns section– A Rows section– A Filtes section
![Page 42: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/42.jpg)
Controlling placement of dimensions on axes
● Clicking the little square before a dimension you can move the dimension from Rows (Columns) to Columns (Rows)
![Page 43: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/43.jpg)
Slicing with the OLAP Navigator (I)
● A slicer corresponds to the MDX WHERE clause– Used to show only a subset (slice) of the data
● Clicking on the funnel icon you move a dimension in the Filter section
![Page 44: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/44.jpg)
Slicing with the OLAP Navigator (II)
![Page 45: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/45.jpg)
Specifying member sets
● It is also possible to specify particular members on columns and rows axes
![Page 46: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/46.jpg)
MDX query pane
● You can also view the MDX query that represent the current state of the analysis view– Useful to learn MDX syntax
![Page 47: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/47.jpg)
Export
● Print to PDF
● export in MS Excel format
![Page 48: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/48.jpg)
Charts
● JPivot allows to display data in a chart● The chart can be configured
![Page 49: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/49.jpg)
Alternative to JPivot
● Pentaho has a modular structure– It may be extended with new plugins
● SAIKU– Provide a plugin for Pentaho offering lightweight
OLAP features– It also provides a RESTful server that can connect
with any OLAP system– http://analytical-labs.com
![Page 50: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/50.jpg)
Saiku
● It allows to execute OLAP analysis on any cube already defined
● Based on the definition of what we want to see in the analysis– By specifying which dimensions/measures we want
on columns, rows, and filters● Drag 'n' drop UI
![Page 51: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/51.jpg)
Defining the analysis (I)
● Once a cube has been selected the available dimensions (with hierarchies) and measures are listed
![Page 52: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/52.jpg)
Defining the analysis (II)
● Then, we can drag'n'drop dimensions and measures as we want in columns, rows, filters
– We are restricted only to not put measures on both columns and rows
● After each changethe query is updated and executed automatically
![Page 53: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/53.jpg)
Defining the analysis (III)
![Page 54: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/54.jpg)
Filtering
● Filters may be applied to visible (columns and rows) and invisible (filter) dimensions
![Page 55: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/55.jpg)
Ordering● Each dimension and/or measure can be used to order data
– But not all possible combinations are allowed● We can't order both by a measure on columns and a dimension on
row (or viceversa)
![Page 56: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/56.jpg)
Popup menus
● Some options for fast filtering and adding/removing dimension levels are available by clicking on columns and rows header
![Page 57: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/57.jpg)
Charts
● Data can be also reported in a chart
![Page 58: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/58.jpg)
Statistics
● Saiku allows also to show some statistics about columns values
![Page 59: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/59.jpg)
Other commands
● Other available commands include:– Show MDX query– Drill through on cell– Export Drill-Through on cell to CSV– Export XLS– Export CSV
![Page 60: OLAP Solutions using Pentaho Analysis Services](https://reader033.vdocument.in/reader033/viewer/2022051123/5868ca461a28abb4408c0675/html5/thumbnails/60.jpg)
Saiku remarks
● Saiku is still in development– Some features of JPivot are missing– Some features have bugs or malfunctionings
● Charts● Drill through