pentaho mondrian olap cubes. installation install tomcat (version 5.0.25 or later). – set...
TRANSCRIPT
![Page 1: Pentaho Mondrian OLAP CUBES. Installation Install Tomcat (version 5.0.25 or later). – Set JAVA_HOME Environment Variable pointed to SDK installation](https://reader033.vdocuments.site/reader033/viewer/2022061511/56649cc95503460f9499129c/html5/thumbnails/1.jpg)
Pentaho Mondrian
OLAP CUBES
![Page 2: Pentaho Mondrian OLAP CUBES. Installation Install Tomcat (version 5.0.25 or later). – Set JAVA_HOME Environment Variable pointed to SDK installation](https://reader033.vdocuments.site/reader033/viewer/2022061511/56649cc95503460f9499129c/html5/thumbnails/2.jpg)
Installation
• Install Tomcat (version 5.0.25 or later).– Set JAVA_HOME Environment Variable pointed to
SDK installation.
![Page 3: Pentaho Mondrian OLAP CUBES. Installation Install Tomcat (version 5.0.25 or later). – Set JAVA_HOME Environment Variable pointed to SDK installation](https://reader033.vdocuments.site/reader033/viewer/2022061511/56649cc95503460f9499129c/html5/thumbnails/3.jpg)
Installation
– Add %JAVA_HOME%\bin to general path• Test TOMCAT installation:– localhost:8080
![Page 4: Pentaho Mondrian OLAP CUBES. Installation Install Tomcat (version 5.0.25 or later). – Set JAVA_HOME Environment Variable pointed to SDK installation](https://reader033.vdocuments.site/reader033/viewer/2022061511/56649cc95503460f9499129c/html5/thumbnails/4.jpg)
Installation
• Explode mondrian.rar to TOMCAT_HOME/webapps– Test: localhost:8080/mondrian/
![Page 5: Pentaho Mondrian OLAP CUBES. Installation Install Tomcat (version 5.0.25 or later). – Set JAVA_HOME Environment Variable pointed to SDK installation](https://reader033.vdocuments.site/reader033/viewer/2022061511/56649cc95503460f9499129c/html5/thumbnails/5.jpg)
Creating OLAP Cube
• Explode psw-ce-3.6.1.rar– Put mysql-connector-java-5.1.29-bin in drivers
folder.– Execute workbench.bat– Options Connection• Use the sakila user to connect to the database sakila
– Open File: TOMCAT_HOME\webapps\mondrian\WEB-INF\queries\Sakila.xml
– See the CUBE Rentals
![Page 6: Pentaho Mondrian OLAP CUBES. Installation Install Tomcat (version 5.0.25 or later). – Set JAVA_HOME Environment Variable pointed to SDK installation](https://reader033.vdocuments.site/reader033/viewer/2022061511/56649cc95503460f9499129c/html5/thumbnails/6.jpg)
Mondrian Cube Structure
Fact Table
Dimension
Measure
Levels
Dimension Table
![Page 7: Pentaho Mondrian OLAP CUBES. Installation Install Tomcat (version 5.0.25 or later). – Set JAVA_HOME Environment Variable pointed to SDK installation](https://reader033.vdocuments.site/reader033/viewer/2022061511/56649cc95503460f9499129c/html5/thumbnails/7.jpg)
Creating a Query to Rentals OLAP Cube
• File New MDX query:– select {[Measures].[Rental Counts]} on columns,
{[Customers].[All Customers]} ON rows from Rental
– Execute in JPIVOT• http://localhost:8080/mondrian/testpage.jsp?query=re
ntalquery2
![Page 8: Pentaho Mondrian OLAP CUBES. Installation Install Tomcat (version 5.0.25 or later). – Set JAVA_HOME Environment Variable pointed to SDK installation](https://reader033.vdocuments.site/reader033/viewer/2022061511/56649cc95503460f9499129c/html5/thumbnails/8.jpg)
![Page 9: Pentaho Mondrian OLAP CUBES. Installation Install Tomcat (version 5.0.25 or later). – Set JAVA_HOME Environment Variable pointed to SDK installation](https://reader033.vdocuments.site/reader033/viewer/2022061511/56649cc95503460f9499129c/html5/thumbnails/9.jpg)
JPIVOT
• Queries and cubes are stored in the folder webapps \ mondrian \ WEB-INF \ queries.– See the query: rentalquery2.jsp.– See the cube Sakila.xml
![Page 10: Pentaho Mondrian OLAP CUBES. Installation Install Tomcat (version 5.0.25 or later). – Set JAVA_HOME Environment Variable pointed to SDK installation](https://reader033.vdocuments.site/reader033/viewer/2022061511/56649cc95503460f9499129c/html5/thumbnails/10.jpg)
Create a cube for Sakila Data Warehouse
• Create a New Schema SakilaOlap.xml– Save in TOMCAT_HOME\webapps\mondrian\
WEB-INF\queries\– Configure the connection to the database with
user sakila_dwh.
![Page 11: Pentaho Mondrian OLAP CUBES. Installation Install Tomcat (version 5.0.25 or later). – Set JAVA_HOME Environment Variable pointed to SDK installation](https://reader033.vdocuments.site/reader033/viewer/2022061511/56649cc95503460f9499129c/html5/thumbnails/11.jpg)
Create a cube for Sakila Data Warehouse
• Create a cube named Rentals.– Add a fact table: link it to the table fact_rental– Add Customer dimension
![Page 12: Pentaho Mondrian OLAP CUBES. Installation Install Tomcat (version 5.0.25 or later). – Set JAVA_HOME Environment Variable pointed to SDK installation](https://reader033.vdocuments.site/reader033/viewer/2022061511/56649cc95503460f9499129c/html5/thumbnails/12.jpg)
Customer dimension
• Add the a hierarchy for Customer Dimension• Add the table: dim_customer• Add a level (Name) for hierarchy.
![Page 13: Pentaho Mondrian OLAP CUBES. Installation Install Tomcat (version 5.0.25 or later). – Set JAVA_HOME Environment Variable pointed to SDK installation](https://reader033.vdocuments.site/reader033/viewer/2022061511/56649cc95503460f9499129c/html5/thumbnails/13.jpg)
Customer dimension
![Page 14: Pentaho Mondrian OLAP CUBES. Installation Install Tomcat (version 5.0.25 or later). – Set JAVA_HOME Environment Variable pointed to SDK installation](https://reader033.vdocuments.site/reader033/viewer/2022061511/56649cc95503460f9499129c/html5/thumbnails/14.jpg)
Film dimension
• Add the a hierarchy for Film Dimension• Add the table: dim_film• Add a level (NameFilm) for hierarchy.
![Page 15: Pentaho Mondrian OLAP CUBES. Installation Install Tomcat (version 5.0.25 or later). – Set JAVA_HOME Environment Variable pointed to SDK installation](https://reader033.vdocuments.site/reader033/viewer/2022061511/56649cc95503460f9499129c/html5/thumbnails/15.jpg)
Film dimension
![Page 16: Pentaho Mondrian OLAP CUBES. Installation Install Tomcat (version 5.0.25 or later). – Set JAVA_HOME Environment Variable pointed to SDK installation](https://reader033.vdocuments.site/reader033/viewer/2022061511/56649cc95503460f9499129c/html5/thumbnails/16.jpg)
Date dimension
• Add the a hierarchy for Date Dimension• Add the table: dim_date• Add a level (Year) for hierarchy.• Add a level (Month) for hierarchy.
![Page 17: Pentaho Mondrian OLAP CUBES. Installation Install Tomcat (version 5.0.25 or later). – Set JAVA_HOME Environment Variable pointed to SDK installation](https://reader033.vdocuments.site/reader033/viewer/2022061511/56649cc95503460f9499129c/html5/thumbnails/17.jpg)
Date dimension
![Page 18: Pentaho Mondrian OLAP CUBES. Installation Install Tomcat (version 5.0.25 or later). – Set JAVA_HOME Environment Variable pointed to SDK installation](https://reader033.vdocuments.site/reader033/viewer/2022061511/56649cc95503460f9499129c/html5/thumbnails/18.jpg)
Date dimension
![Page 19: Pentaho Mondrian OLAP CUBES. Installation Install Tomcat (version 5.0.25 or later). – Set JAVA_HOME Environment Variable pointed to SDK installation](https://reader033.vdocuments.site/reader033/viewer/2022061511/56649cc95503460f9499129c/html5/thumbnails/19.jpg)
Add a Measure for the Cube
![Page 20: Pentaho Mondrian OLAP CUBES. Installation Install Tomcat (version 5.0.25 or later). – Set JAVA_HOME Environment Variable pointed to SDK installation](https://reader033.vdocuments.site/reader033/viewer/2022061511/56649cc95503460f9499129c/html5/thumbnails/20.jpg)
Add a Query
• Edit rentalquery2.jsp– Change: • jdbcUrl="jdbc:mysql://localhost/sakila_dwh?
user=sakila_dwh&password=sakila_dwh" • catalogUri="/WEB-INF/queries/Name.xml“
– Add the query: – select {[Measures].[Metrica1]} on columns,
{([Customer],[Date])} ON rows from Rentals– Reload Tomcat server.
![Page 21: Pentaho Mondrian OLAP CUBES. Installation Install Tomcat (version 5.0.25 or later). – Set JAVA_HOME Environment Variable pointed to SDK installation](https://reader033.vdocuments.site/reader033/viewer/2022061511/56649cc95503460f9499129c/html5/thumbnails/21.jpg)
Open JPIVOT
• Open http://localhost:8080/mondrian/testpage.jsp?query=rentalquery
• Answer the following questions:– Año y mes donde se realizaron mas ventas?– Cuantas rentas hizo el usuario en el 2005 (en que
meses?).
![Page 22: Pentaho Mondrian OLAP CUBES. Installation Install Tomcat (version 5.0.25 or later). – Set JAVA_HOME Environment Variable pointed to SDK installation](https://reader033.vdocuments.site/reader033/viewer/2022061511/56649cc95503460f9499129c/html5/thumbnails/22.jpg)
Tarea
• Incluya todas las dimensiones del modelo estrella de sakila.
• Estudie las consultas MDX y construya dos consultas que incluyan la sentencia where y permitan explotar todas las dimensiones del cubo en jpivot.(http://msdn.microsoft.com/es-es/library/ms145514.aspx):