[Mondrian] MySQL column aliases in Mondrian 4 view

Tom Barber tom at analytical-labs.com
Mon Jan 25 08:43:36 EST 2016


I'll supply a 1 line fix and no test case, or, a 1 line fix and a test case
if someone documents the Mondrian test suite! It took me so long figuring
out how the test suite works last time, I gave up because the debugger was
making my laptop melt :)

--------------

Director Meteorite.bi - Saiku Analytics Founder
Tel: +44(0)5603641316

(Thanks to the Saiku community we reached our Kickstart
<http://kickstarter.com/projects/2117053714/saiku-reporting-interactive-report-designer/>
goal, but you can always help by sponsoring the project
<http://www.meteorite.bi/products/saiku/sponsorship>)

On 22 January 2016 at 17:22, Julian Hyde <julianhyde at gmail.com> wrote:

> Can you contribute a PR?
>
> On Jan 22, 2016, at 1:38 AM, Tom Barber <tom at analytical-labs.com> wrote:
>
> Thanks for that Julian I patched our version of Mondrian 4 and it's
> spluttered back into life.
>
> Tom
>
> --------------
>
> Director Meteorite.bi - Saiku Analytics Founder
> Tel: +44(0)5603641316
>
> (Thanks to the Saiku community we reached our Kickstart
> <http://kickstarter.com/projects/2117053714/saiku-reporting-interactive-report-designer/>
> goal, but you can always help by sponsoring the project
> <http://www.meteorite.bi/products/saiku/sponsorship>)
>
> On 21 January 2016 at 19:31, Tom Barber <tom at analytical-labs.com> wrote:
>
>> Already logged mondrian-2450
>> On 21 Jan 2016 19:29, "Julian Hyde" <julianhyde at gmail.com> wrote:
>>
>>> Yes, it's a bug. It should be looking for the column label rather than
>>> its name. In RolapSchema.PhysSchema.describe, the line
>>>
>>>   final String columnName =  metaData.getColumnName(i + 1);
>>>
>>> should be
>>>
>>>   final String columnName =  metaData.getColumnLabel(i + 1);
>>>
>>> Can someone please log a JIRA case for this?
>>>
>>> Julian
>>>
>>>
>>> On Wed, Jan 20, 2016 at 11:26 AM, Andy Grohe <agrohe21 at gmail.com> wrote:
>>> > That seems like a bug to me in the mondrian 4 branch. I'm pretty sure
>>> I use
>>> > that successfully in mondrian 3 in the past.
>>> >
>>> > On Jan 20, 2016 12:20 PM, "Tom Barber" <tom at analytical-labs.com>
>>> wrote:
>>> >>
>>> >> Here's another one:
>>> >>
>>> >> <Query alias="my_view">
>>> >>                         <ExpressionView>
>>> >>                                 <SQL dialect='mysql'>
>>> >>                                          <![CDATA[select
>>> f.customer_id,
>>> >> f.fname, f.fname `f2` from customer f]]>
>>> >>                                 </SQL>
>>> >>                         </ExpressionView>
>>> >>                 </Query>
>>> >>
>>> >> If I try and use column f2 in a dimension I get a column not found
>>> error.
>>> >> If I look in the rolapschemaloader the table is indeed missing this
>>> column
>>> >> as I guess it looks up the names and ignores the alias.
>>> >>
>>> >> I assume thats by accident rather than design? I can't see why
>>> Mondrian
>>> >> wouldn't support mysql column aliases?
>>> >>
>>> >> If it looks like a bug I'll see if I can come up with a patch.
>>> >>
>>> >> Tom
>>> >>
>>> >>
>>> >> _______________________________________________
>>> >> 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
>>> >
>>> _______________________________________________
>>> 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
>
>
>
> _______________________________________________
> 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/20160125/d4d5d2af/attachment.html 


More information about the Mondrian mailing list