MondrianOlap
This article is for using the Mondrian OLAP server. If you use Mondrian, then you may encounter the following problems. These issues and their resolutions are described in the context of the default configuration file
FoodMart.xml provided by Mondrian.
Mondrian parsing MDX to SQL leads to type conversion problem
For example:
[Department].[All Departments].[1] parsed to SQL may result in
department_id='1' because the
department_id has no type, and the default type is String. The correct SQL would be
department_id=1
Resolution
Specify the data type. For example:
<Dimension name="Department" foreignKey="department_id">
<Hierarchy hasAll="true" primaryKey="department_id">
<Table name="department"/>
<Level name="Department Description" uniqueMembers="true"
column="department_id" type="Numeric"/>
</Hierarchy>
</Dimension>
Null type not correctly expressed in XML
Mondrian will return
#null when data in the fact table is missing, but this causes the XML to not be parsed.
Resolution
Ensure that columns in the fact table that will be used as dimension level values do not contain nulls.
CalculatedMember caption problem
If a CalculatedMember tag has a caption different from the name, the XML returned by Mondrian will not discriminate the measures.
Resolution
Make the caption the same as the name or remove the caption:
<CalculatedMember name="Profit Growth" caption="Profit Growth">***</CalculatedMember>
<CalculatedMember name="Profit Growth">***</CalculatedMember>
Multiple Hierarchies Under the Same Dimension
Mondrian does not support selecting from multiple hierarchies that are the same dimension. For example, two different grouping levels of a date field. This is a known limitation of Mondrian, but in practice these queries tend to not make sense.