title: Creating a hierarchy in Mondrian/Saiku with names from different tables
body: <p>Let's say we've got a fact table "bi_slots", in which there are fields (id,region_id,city_id). In fact there are more fields, but they are of no interest here.</p>
  
  <p>There also is 'regions' table in which there are (id,name) fields and 'cities' table with (id,name,region_id) fields.</p>
  
  <p>What i need is to make a Dimension for a Cube of "bi_slots" where applied is Region->Сity hierarchy. And, i would need to grab region and city name from their respective tables.</p>
  
  <p>So, Dimension looks like:</p>
  
  <pre><code>&lt;Dimension name="AddressDimension" caption="Address"&gt;
      &lt;Hierarchy name="AddressHierarchy" hasAll="true" primaryKey="id" caption="Region" allMemberCaption="Regions"&gt;
        &lt;Table name="regions"/&gt;  
        &lt;Level table="regions" column="id" nameColumn="name" name="RegionLevel" uniqueMembers="true" type="String" caption="Region"/&gt;
        &lt;Level table="cities" column="id" nameColumn="name" name="CityLevel" uniqueMembers="true" type="String" caption="City"/&gt;      
      &lt;/Hierarchy&gt;
  &lt;/Dimension&gt;
  </code></pre>
  
  <p>And the declaration for the Cube with this dimensionUsage</p>
  
  <pre><code>&lt;Cube name="SlotsCube" caption="Slot Cube"&gt;
     &lt;View alias="bi_slots"&gt;
       &lt;SQL&gt;&lt;![CDATA[
         select *, date_trunc('day', created_at) as date_created_at from bi_slots
       ]]&gt;&lt;/SQL&gt;
     &lt;/View&gt;
  
  &lt;DimensionUsage name="AddressDimension" source="AddressDimension" foreignKey="region_id"/&gt;
  </code></pre>
  
  <p>Being put like this, it makes Mondrian not show this cube at all, but when i delete CityLevel from my dimension i get a perfectly fine filtering by regions.</p>
  
  <p>Any help would be more than welcome, we are really out of ideas here.</p>