Archive for December, 2008

Aggregate Table Naming in Aggregation Designer

This week, Nick Goodman and I worked together on Aggregation Designer’s approach to naming aggregate tables and their columns.    The team’s initial approach to table naming was to use Mondrian’s AggName convention, where you must explicitly define aggregate tables in Mondrian’s schema.  Our decision was made to guarantee that the tables would be recognized.

After working with Agg Designer in the wild, Nick created PAD-22, a feature request asking for a change in naming aggregate tables to match Mondrian’s default recognition rules.

When developing Agg Designer originally, we used Spring, which makes this type of change very easy to implement and configure.  To implement this change, we first started off by implementing an AggregateNamingService thatnames the tables to match Mondrian’s default pattern, agg_.+_${fact_table_name}.  We then implemented an OutputFactory which generates the appropriate names for the Aggregate Table columns.  These classes are now checked in to the core and ui projects, named RuleBasedAggregateTableOutputFactory and RuleBasedAggregateNamingServiceImpl.  To configure Agg Designer to use these classes, simply modify the Spring applicationContext.xml and the plugin.xml files.

I’ve provided compiled versions of these classes and instructions in the feature request, until we release a new version of Pentaho Aggregation Designer.  Thanks Nick for the help, hopefully this will make it easier to use the Aggregation Designer to increase Mondrian performance!