[Mondrian] Default Aggregate Recognizer fails when 2 dimensions are mapped from same table in a schema

Joe Barnett thejoe at gmail.com
Wed Mar 30 13:14:48 EDT 2011

I believe we've gotten this to work by aliasing the different usages
of the table, and building the aggregate table and column names based
on the aliases.

So we have, for example, N dimensions built off a single table, where
the schema looks like (we use StringTemplate to parameterize the
schema, so $it$ gets expanded into each of the N dimensions,
<Dimension name="Dim_$it$">
    <Hierarchy allMemberName="All Dim_$it$">
        <Table name="dim_table" alias="dim_table_$it$">
        <Level name="level_name" ... />

and then have aggtables named agg_c_dim$it$_fact, with a column


(Somewhat related is MONDRIAN-812, but that's cause we're using a
KeyExpression w/in the level, and appears to be fixed in latest trunk)

On Wed, Mar 30, 2011 at 9:33 AM, Julian Hyde <jhyde at pentaho.com> wrote:
> Can you please log a feature request? Since aggregate tables are mapped at
> the logical level (i.e. columns in the agg table correspond to levels in a
> dimension), it's not clear that there is a simple mapping if two dimensions
> share the same dimension table. But it's definitely a reasonable thing to
> want.
> Julian
> ________________________________
> From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On
> Behalf Of Venkatesh U
> Sent: Tuesday, March 29, 2011 10:56 PM
> To: Mondrian developer mailing list
> Subject: [Mondrian] Default Aggregate Recognizer fails when 2 dimensions are
> mapped from same table in a schema
> Hi all,
>  I have a scenario where i have to use 2 columns from the same dimension
> table as 2 different dimensions, I have used the same foreign key to define
> both the dimensions. Though this approach works fine with the Cube fact
> table, when it comes to aggregates,Mondrian recognizes only one dimension
> out of the both.  is this a bug or is this case not supported? Please
> clarify.
> Thanks,
> Venkatesh
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian

More information about the Mondrian mailing list