Skip to main content

Creating Mondrian Star Schemas with Power*Architect - Part 2/2

This is part two of my step by step guide on creating a Mondrian Schema with Power*Architect.

Step 3 - Creating the Mondrian schema
  • Go to OLAP-> Edit Schema -> New Schema.
  • Enter a Schema name and select the database connection you created earlier.
  • Dimensions
    • Right click on the PlayPen, select New Dimension, and click on the PlayPen again
    • Enter the dimension name, select TimeDimension as the dimension type and click on ok.
    • Right click on the created dimension and add a hierarchy. Select the time table (public.dim_time) and select the correct primary key.
    • Now you can add levels. Right click on the hierarchy and select Add level. Enter the name, column and correct level type.
    • The procedure is the same for all dimensions.
  • Cube
    • Right click on the PlayPen, select New Cube, and click on the PlayPen again
    • Enter the Cube name and select the fact table (public.orderfact in my example)
    • Add the dimensions to the cube. Click on (Dimension Usage), then on dimension and finally on the cube. (This procedure is supposed to get easier in a later release of Power Architect).
    • Enter a caption and select correct foreign key out of the fact table.
    • Follow the instructions for the other dimensions.
  • Measures
    • To add measures to your cube, right click on the cube name, select the aggregator and the correct column from your fact table.
  • Your schema should look similar to the following screenshot.
  • Export the schema using the last icon (or by right clicking in the schema) to your hard drive.
  • Save the project and close Power*Architect
Step 4 - Testing the Mondrian schema
  • Install and start Wabit.
  • Create a new Workspace with a new OLAP database connection
  • Select "In-process Mondrian-Server", the database connection you already created in Power*Architect, and select your Mondrian Schema you exported earlier. You can see an example in the screenshot
  • Click on "Start"
  • Wabit automatically starts in the query mode.
  • Select the created cube in the right hand bar. All measures and Dimensions will be listed. underneath.
  • Drag&Drop the measures and dimensions into the OLAP query editor and see the results. Your result should look similar to mine (I'm using a slightly different version of Wabit).

Step 5 - Troubleshooting
If you run into problems check the following:
  • HSQLDB doesn't like multiple connections too much. Make sure you have only one open connection.
  • If you can't create a query with Wabit, load the Schema into the Mondrian Schema Workbench and check if it's working there. Maybe you missed something when you created the schema.
  • Can't fix it? Write a comment or use the SQL Power forum.

Comments

Popular posts from this blog

Pentaho Data Integration - Multi-part Form submission with file upload using the User Defined Java Class Step

I recently needed to use Pentaho Data Integration (PDI) to send a file to a server for processing using HTTP Post. I spent several hours trying to use the existing steps HTTP Post, HTTP Client & Rest Client but I couldn't get it to work. After some more research I came across the issue PDI-10120 - Support for Multi-part Form Submittal In Web Service Steps  and I thought I was out of luck. I previously wrote a small Java client for a similar use case and remembered the PDI has a step called User Defined Java Class  (UDJC). After reading this great tutorial I created the following basic transaction. I have a dataset with the URL and the full file path and use the UDJC to make the HTTP call. HTTP Post using User Defined Java Class The Java class handles the actual HTTP Post. It uses 2 input variables, the URL (url) which is used for the call and the file name (longFileName). The HTTP call then contains the file (line 30) and the file name (line 31). I included some basi

Products you don't expect to be 'Made in China' - Del Monte fruit cups

Since I moved to Canada back in March I have started to realize how many products are actually made in China. Back in Germany you could also buy lots of stuff from China but you mostly had the choice between German or Europe products and Chinese products. When I went to Food Basics in Oakville a couple weeks ago to get some apples I stood in front of a huge tray of Chinese apples! Aren't there enough apples in Ontario, Canada or the US? Even Mexico would probably be closer than China. Another day my wife bought Del Monte fruit cups in the grocery store. I checked the label when I was going to eat it and i decided to leave it in the fridge. First of all it is 'Made in China' (again I guess no other country in this world has fruit) and second it contains artificial flavor. How bad must the fruit inside be that you need artificial flavor (and does anybody in China controls how it is made)? For my part I'll check the labels more closely whenever I buy any kind of product

Open Source tool for Data cleansing and Master Data Management

Last weekend SQL Power released an improved version of SQL Power DQguru (formerly known as SQL Power MatchMaker), one of the few open source tools for data cleansing and master data management (MDM) available. Version 0.96 brings a new feature that allows you to run SQL Power DQguru from command line. This allows you to integrate it into batch scripts and your ETL jobs. As a BI consultant for SQL Power I have used SQL Power DQguru in different projects and it has made my job a lot easier. Some of the features I like the most are: Easy connection to any database with JDBC drivers, incl. SQL Server, Oracle, MySQL, Postgres Lets you create complex merge rules so your dependent data will always be updated when you merge records. You can combine over 25 steps to find possible duplicate data with a match rule, for example: Word Count Regular Expressions Substrings Retain certain characters Translate Words, you can create your own translation rules. You can preview how your data