[Mondrian] MySQL column aliases in Mondrian 4 view

Tom Barber tom at analytical-labs.com
Thu Jan 21 14:31:10 EST 2016


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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20160121/90c70a94/attachment.html 


More information about the Mondrian mailing list