title: Creating a new cube with Saiku plugin on Pentaho
body: <p>I have installed Pentaho Community Edition 5.0.1 and successfully created a new data source from a MySQL database (both hosted on my PC).I now want to perform OLAP analysis on this data, but am not entirely sure how to proceed (So please provide additional information in the case where it is clear from my questions that I am heading on a wrong path - I am new to OLAP).</p>
  
  <p>The Saiku plugin is installed and I can view the 2 premade cubes (SampleData and SteelWheels). I now want to create one or more cubes referencing the data in the data source that I had previously created, which is where I am stuck. As I understand it, I need to create a Mondrian schema which defines the cube, going by <a href="http://www.joyofdata.de/blog/getting-started-with-pentaho-bi-server-5-mondrian-and-saiku/" rel="nofollow">this</a> I created the shema for the data source as defined on the same tutorial as </p>
  
  <pre><code>&lt;Schema name="testdb"&gt;
    &lt;Cube name="Test Cube"&gt;
  &lt;Table name="testtable"&gt;
  &lt;/Table&gt;
  &lt;Dimension name="Date"&gt;
    &lt;Hierarchy hasAll="true"&gt;
      &lt;Level name="Date" column="date" type="Integer"/&gt;
    &lt;/Hierarchy&gt;
  &lt;/Dimension&gt;
  &lt;Dimension name="Key 1"&gt;
    &lt;Hierarchy hasAll="true"&gt;
      &lt;Level name="Key 1" column="key1" type="String"/&gt;
    &lt;/Hierarchy&gt;
  &lt;/Dimension&gt;
  &lt;Dimension name="Key 2"&gt;
    &lt;Hierarchy hasAll="true"&gt;
      &lt;Level name="Key 2" column="key2" type="String"/&gt;
    &lt;/Hierarchy&gt;
  &lt;/Dimension&gt;
  &lt;Measure name="Value" column="value" aggregator="sum"/&gt;
  </code></pre>
  
  <p>
  </p>
  
  <p>The tutorial states that this file can be placed anywhere (I', assuming in the biserver-ce folder or sub folders - any best practices on location?). When refreshing the cubes (by pressing the green arrows icon) in Saiku - big surprise - the new cube is not listed, only SampleData and SteelWheels are options in the dropdown (Pentaho had been restarted etc, no effect). When inspecting the created schema, there is no reference to the created data source, so I have no idea how it can be linked or used by Saiku/Pentaho. This is where I think the problem lies, I need to register this file somehow. I have seen references to a data source definition file (<a href="http://docs.analytical-labs.com/saiku/documentation/configuration/2013/08/15/datasources.html" rel="nofollow">like here</a>) which seems to be what I need to do. I cant however find where this file should be placed, what it should be named or any tutorial incorporating such a step. I also find it strange that one has to break out of the usage flow of the Pentaho application to make external files which are needed for following steps - hints that I am doing things wrong.</p>
  
  <p><strong>In summary:</strong> How to create OLAP cube using Pentaho CE and Saiku from a working data source?</p>
  
  <p>It has been surprisingly difficult to find well documented help on usage of Pentaho CE (with Saiku) and warnings on the numerous issues in the setup, I think verbose answers on this question will be of help to the community</p>