All,

Sorry, I lied.  I found some things to change on it.  The link provided is
to an old version, this link:
http://tinyurl.com/cdlu4h
will point to the version that is most recent and if you want to look at all
the versions they are available here:
http://tinyurl.com/cspmbv

thanks,
Matt Follett

On Tue, Mar 31, 2009 at 10:55 AM, Matt Follett <[email protected]>wrote:

> Hello all,
>
> I've been working with generating reports from Star/Snowflake schemas.  As
> such I've written a module that makes this a little easier, at least for
> me.  The module consists of a Dimension and a Fact component.
>
> Loading the Dimension component in a class provides two pieces of
> functionality, it allows you to assign columns of that table that should be
> ignored and it allows you to get a listing of all of the columns that are
> related to that dimension across any of the tables that are related to it.
> In a Star schema this will just return the columns you aren't ignoring and
> in a Snowflake schema this'll recursively walk through the tables to gather
> all of the columns.  The data for that is returned as an array of hashes
> containing the column name and the column data type.
>
> The Fact component provides those two subroutines and a third called
> generate_report.  This subroutine takes a hash ref like so:
> {'filters' => {'dimedate.day_of_week' => 3}, 'metric' =>
> {'dimline.line_velocity' => 1}}
> And would return the ResultSet after converting the line_velocity value to
> an appropriate value for that fact table and  would now include a column
> 'dimdate.day_of_week' with the values from whatever related dimension table
> that came from.
>
> The module allows you to to make a full round trip.  So, you could ask a
> fact table what attributes are available, provide those to another source,
> get back the attributes requested for filtering and viewing, and then pass
> those back to the fact through generate_report.
>
> You can download the module from here:
> http://tinyurl.com/c7gr3t
>
> Does anyone have some comments or recommendations on it?  I still need to
> fix up some of the documentation, it's there but it's not complete.  Once
> that is done do you think this would be worth putting on CPAN as
> DBIx::Class::Snowflake?
>
> Thanks for your time,
> Matt Follett
>
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to