[Mondrian] Problems connecting Mondrian to MonetDB

Julian Hyde jhyde at pentaho.com
Fri Mar 30 13:58:53 EDT 2012


In your schema XML file, what is the type of the column? Integer or Numeric?

Even if you've got it right, it's possible that Mondrian is calling java.sql.ResultSet.getInt(int) when it should be calling .getDouble(int). That would be due to confusion about the types returned by MonetDB's JDBC driver. Or possibly due to a bug in MonetDB's JDBC driver. It's difficult to say where the bug lies.

Julian


On Mar 30, 2012, at 10:36 AM, Pedro Salgueiro wrote:

Hi guys!

I have been trying to connect Mondrian with MonetDB, and I am having a few problems.

I managed to load the FoodMart into MonetDB using the FoodMartDataLoader using the MonetDB JDBC. Then I used the same JDBC to connect Mondrian to MonetDB using olap4j with no problems.

The problem is when I run some MDX queries:

If I include a measure which is represented in a column of type DECIMAL(10,2), e.g: "Unit Sales", the result only presents 0's(zeros).

Example query:
 SELECT
 [Measures].[Unit Sales] on COLUMNS
 FROM [Sales];
Result:
Unit Sales
==========
                           0
Meanwhile, if I use a measure which is represented in a column of type INTEGER, e.g: "Sales Count", the results are correct.

I have been debugging Mondrian while using both MySQL and MonetDB, and after analyzing the CellSet resulting from executeOlapQuery(query), I noticed that in MySQL the values are of type Double, while for MonetDB, the values are of type Integer.

It seems that Mondrian is converting DECIMAL(10,2) to Integer, can't find where.

Does anyone have a clue of how to solve this problem?

Cheers,
Pedro

_______________________________________________
Mondrian mailing list
Mondrian at pentaho.org<mailto:Mondrian at pentaho.org>
http://lists.pentaho.org/mailman/listinfo/mondrian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20120330/4cdddda6/attachment.html 


More information about the Mondrian mailing list