[Mondrian] Top X across measure groups error
mcampbell at pentaho.com
Mon Aug 17 08:39:38 EDT 2015
As confirmation of what’s going on (and as a workaround) you could try setting mondrian.native.topcount.enable=false.
From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On Behalf Of Tom Barber
Sent: Monday, August 17, 2015 8:33 AM
To: Mondrian developer mailing list <mondrian at pentaho.org>
Subject: Re: [Mondrian] Top X across measure groups error
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.
On 17 August 2015 at 13:31, Matt Campbell <mcampbell at pentaho.com<mailto: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> [mailto: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<mailto: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:
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`;
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.
Mondrian mailing list
Mondrian at pentaho.org<mailto:Mondrian at pentaho.org>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mondrian