[Mondrian] Aggregate tables and distinct-count

Pedro Alves pmgalves at gmail.com
Mon Jan 14 13:33:38 EST 2013


I'm not so sure it was using the agg tables. It did one query on the agg 
table and then went to do a distinct-count on the fact table again.

I'm removing the uniqueMembers on the inferior levels (even if they are 
unique). This allows me not to use (un)collapsed levels. A hack, but 
I'll try to see where it leads to


-pedro




On 01/14/2013 05:41 PM, Luc Boudreau wrote:
>
> Depends on the structure of your dimension table. If you create a 1:N
> relation by using non-collapsed levels, then yeah, you'll have wrong
> results returning.
>
> Luc
>
>
> On Mon, Jan 14, 2013 at 12:17 PM, Pedro Alves <pmgalves at gmail.com
> <mailto:pmgalves at gmail.com>> wrote:
>
>     The agg has one single (non-collapsed) level, and this is a star schema.
>     Could I get into troubles?
>
>
>
>     On 01/14/2013 05:14 PM, Luc Boudreau wrote:
>      > Be careful with the non-collapsed dimensions. This feature needs the
>      > tables to be in a snowflake form. If the dimension table is a single
>      > table and you join on the non-last level, you will get a
>     cartesian product.
>      >
>      > Luc
>      >
>      > On Mon, Jan 14, 2013 at 12:04 PM, Pedro Alves <pmgalves at gmail.com
>     <mailto:pmgalves at gmail.com>
>      > <mailto:pmgalves at gmail.com <mailto:pmgalves at gmail.com>>> wrote:
>      >
>      >
>      >
>      >     IT IS WORKING!
>      >
>      >
>      >     However, I had to skip the first level of a hierarchy,
>     marking the
>      >     second level as collapsed= false.. something I've never used
>     before and
>      >     seems to be exactly for this :p
>      >
>      >
>      >
>      >     -pedro
>      >
>      >
>      >
>      >
>      >     On 01/14/2013 05:01 PM, Julian Hyde wrote:
>      >      > yes, it should be used.
>      >      >
>      >      > furthermore, mondrian knows that it is safe to roll up any
>      >     attributes that are functionally dependent on the measure column.
>      >     (e.g. if you have computed count(distinct customer_id), and
>     you have
>      >     in the agg table the distinct count for male and female
>     customers in
>      >     each state, you can compute the number of distinct customers
>     in each
>      >     state by adding the distinct males and females.)
>      >      >
>      >      > Julian
>      >      >
>      >      >
>      >      > On Jan 14, 2013, at 8:52 AM, Pedro Alves
>     <pmgalves at gmail.com <mailto:pmgalves at gmail.com>
>      >     <mailto:pmgalves at gmail.com <mailto:pmgalves at gmail.com>>> wrote:
>      >      >
>      >      >>
>      >      >>
>      >      >> I know we can't aggregate distinct-count measures like we do
>      >     with the
>      >      >> others.
>      >      >>
>      >      >> But if a query matches a specific aggregation table's bitkey,
>      >      >> couldn't/shuoldn't it be used?
>      >      >>
>      >      >>
>      >      >>
>      >      >> -pedro
>      >      >> _______________________________________________
>      >      >> Mondrian mailing list
>      >      >> Mondrian at pentaho.org <mailto:Mondrian at pentaho.org>
>     <mailto:Mondrian at pentaho.org <mailto:Mondrian at pentaho.org>>
>      >      >> http://lists.pentaho.org/mailman/listinfo/mondrian
>      >      >
>      >      > _______________________________________________
>      >      > Mondrian mailing list
>      >      > Mondrian at pentaho.org <mailto:Mondrian at pentaho.org>
>     <mailto:Mondrian at pentaho.org <mailto:Mondrian at pentaho.org>>
>      >      > http://lists.pentaho.org/mailman/listinfo/mondrian
>      >      >
>      >     _______________________________________________
>      >     Mondrian mailing list
>      > Mondrian at pentaho.org <mailto:Mondrian at pentaho.org>
>     <mailto:Mondrian at pentaho.org <mailto:Mondrian at pentaho.org>>
>      > http://lists.pentaho.org/mailman/listinfo/mondrian
>      >
>      >
>      >
>      >
>      > _______________________________________________
>      > Mondrian mailing list
>      > Mondrian at pentaho.org <mailto:Mondrian at pentaho.org>
>      > http://lists.pentaho.org/mailman/listinfo/mondrian
>      >
>     _______________________________________________
>     Mondrian mailing list
>     Mondrian at pentaho.org <mailto: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
>


More information about the Mondrian mailing list