[Mondrian] Top X across measure groups error

Tom Barber tom at analytical-labs.com
Mon Aug 17 08:33:18 EDT 2015


Yeah, I figured it was similar to Virtual Cubes in the way it did the SQL,
thanks Matt. I'm sure it'll be similar in Foodmart, so I'll create a test
case and slap it in shortly.

Tom

On 17 August 2015 at 13:31, Matt Campbell <mcampbell at pentaho.com> wrote:

>
>
> In virtual cubes in M3, and presumably with multiple measures groups in
> M4, native tuple queries will bring two or more fact table queries together
> by unioning.  In M3 there’s a check that prevents using the native topcount
> evaluator with virtual cubes.  It’s possible that check is not present or
> not working w/ multiple measure groups.
>
>
>
> If you can, reproduce in Foodmart and add it to 2391.  Also attach the
> logs.
>
>
>
>
>
> *From:* mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org]
> *On Behalf Of *Tom Barber
> *Sent:* Sunday, August 16, 2015 8:12 AM
> *To:* Mondrian developer mailing list <mondrian at pentaho.org>
> *Subject:* [Mondrian] Top X across measure groups error
>
>
>
> This is a long shot and I guess I'm going to have to delve into the MySQL
> dialect stuff but I figured I'd check to see if anyone had seen similar
> else where in mondrian:
>
>
>
> http://jira.pentaho.com/browse/MONDRIAN-2391
>
>
>
> Basically I have 2 measure groups, they both run off the same fact table
> but they aggregaet differently so its nice to separate them.
>
>
>
> When I run a Top count but add a measure from 2 different measure groups
> on MySQL I get incorrect SQL generated
>
>
>
> select `earthquakes`.`place` as `c0`, count(`earthquakes`.`id`) as `c1`
> from `earthquakes` as `earthquakes` group by `earthquakes`.`place` union
> select `earthquakes`.`place` as `c0`, count(`earthquakes`.`id`) as `c1`
> from `earthquakes` as `earthquakes` group by `earthquakes`.`place`;
>
>
>
> which causes
>
>
>
> SQLException: Incorrect usage of UNION and ORDER BY
>
>
>
> I tried messing with the union options in the mysql dialect but it didn't
> seem to make a difference.
>
>
>
> Tom
>
> _______________________________________________
> 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/20150817/09812961/attachment.html 


More information about the Mondrian mailing list