Introduction
Sakila is a movie rental sample database provided by MySQL. This database is very suitable to demonstrate the use of Pentaho's tools in various way.
For this purpose, I'll write a series of articles showing the use of Sakila with Mondrian and Kettle. And to begin with, this first article will show us how to get the sample database, creating a very basic cube definition and query it - all without altering the underlying data.
Download and Installation
- Get Sakila sql script from http://dev.mysql.com/doc/#sampledb.
- For installation, follow instructions from http://dev.mysql.com/doc/sakila/en/sakila.html#sakila-installation.
Sakila Scheme
This is Sakila scheme taken from MySQL's documentation. Click on the image to see the larger complete view.
Create Mondrian Cube's XML file
For this sample, I will design my Sakila's cube as follows :- 1 cube : Rental
- 1 hierarchical dimension : Customers with All Customers, Active, and Name levels
- 1 measure : Rental Counts
From this definition, I specify all related elements into XML definition file. Here I name the file Sakila.xml and put it into [MONDRIAN]/WEB-INF/queries folder.
Create a JSP's query file
Now, create a rentalquery.jsp file in the same folder as Sakila.xml.Replace text in red color with your own database setting.
Testing the result
- Make sure your Mondrian and MySQL database server is running - assuming the Mondrian's address url is http://localhost:8080/mondrian
- Open your browser
- Navigate to http://localhost:8080/mondrian/testpage.jsp?query=rentalquery
- If all running fine, you will see the slice and dice of JPivot's view. A view that may look like figure below.


There are reports on some issues with previous version of our attached files (Sakila.xml & rentalquery.jsp).
For those of you who experience the same problem, please redownload the files or please change "Rental Count" to "Rental Counts" in the content all of those files.
Thanks !
Feris Thia