[Mondrian] Problems connecting Mondrian to MonetDB

Pedro Salgueiro pedro.salgueiro at inductiva.pt
Fri Mar 30 16:35:45 EDT 2012


On Fri, Mar 30, 2012 at 6:58 PM, Julian Hyde <jhyde at pentaho.com> wrote:

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

Can't find a reference to the type of the column in the XML file. I am
using the default Foodmart.xml schema which ships with Mondrian and using
the column "unit_sales" from table "sales_fact_1997".

Guess that would not be the problem, otherwise, it would also fail with
MySql.


> 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.
>

Maybe the best way to trace the problem is to debug MonetDB's JDBC driver
itself and check which calls are being done.

Any other hint will be helpful.

Thanks,
Pedro


> 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
> http://lists.pentaho.org/mailman/listinfo/mondrian
>
>
>
> _______________________________________________
> Mondrian mailing list
> 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/067f536c/attachment-0001.html 


More information about the Mondrian mailing list