Paco,

You're a saint!  Thank you!  I got the DateDimension setup and loaded
successfully, and will start working on the other bits tomorrow.  When I get
everything working, I'll post a blog (I'm keeping notes).  Call it AW for
noobs :-)

One other question.  How does the view stuff work (high level)?  I saw one
of the commits on github referring to Yahoo UI charts/datatable.  Do I need
Yui4Rails to help with views? Or does AW generate view HTML by itself?

Thanks again for the quick response.

Regards,
John

On Thu, May 21, 2009 at 4:52 PM, Paco Viramontes <kidpo...@gmail.com> wrote:

> I am running on 2.3.2 with no problem
> You need to add the date dimension class in you model dir as such
>
> class DateDimension < ActiveWarehouse::DateDimension
>   define_hierarchy :anual,
> [:calendar_year,:calendar_quarter,:calendar_month_name,:calendar_week,:day_in_week]
>
>   define_hierarchy :trimestral,
> [:calendar_quarter,:calendar_month_name,:calendar_week,:day_in_week]
>   define_hierarchy :mensual,
> [:calendar_month_name,:calendar_week,:day_in_week]
>   define_hierarchy :semanal, [:calendar_week]
>   define_hierarchy :diario, [:day_in_week]
>
>   set_order :sql_date_stamp
> end
>
> --------------------
> then make your fact class,
>
> # model/sales_fact.rb
> class SalesFact < ActiveWarehouse::Fact
>   aggregate :total, :label => "Total", :order => 'Total'
>
>   dimension :date
>   dimension :location
>
>   prejoin :date => [:sql_date_stamp]
>   prejoin :location  => [:zip]
>
> end
>
> other dimension classes,
>
> # model/location_dimension.rb
> class LocationDimension < ActiveWarehouse::Dimension
>   define_hierarchy :region, [:region, :state, :zip]
>   define_hierarchy : zip, [: zip]
> end
>
> and cube defioition class
>
> # model/sales_cube.rb
> class SalesCube < ActiveWarehouse::Cube
>   reports_on :robo_negocios
>   pivots_on :date, :lugar, :robo_negocio
> end
>
> in your conrtoller index
>
> @report = ActiveWarehouse::Report::TableReport.new
> @view = @report.view(params, options)
>
> and finally in your view
>
>
> <%= render_report_from(@view) %>
>
> and voila,
>
> of course there is much more work than that but it is an approximation,
> obviously you would have to have data in your database populated that
> matched the dimension and fact fiels I considered
>
> Cheers
>
> Hope it helps
>
> On May 21, 2009, at 6:23 PM, John Dell wrote:
>
> Hi,
>
> I'm trying out AW for a rails (2.3.2) project.  I've used BI software
> (siebel analytics) in the past so I'm famiilar with warehousing concepts in
> general.
>
> I've found several links to the tutorial
> http://anthonyeden.com/2006/12/20/activewarehouse-example-with-rails-svn-logsbut
>  it is gone and others posts suggest it is very out of date.
>
> So how else to get started with AW?  Or is there a copy of that tutorial
> floating around somewhere?
>
> I installed AW from the git repo as a plugin, added the gem dependencies
> and no errors.
>
> Then I ran the generator for a fact table, and populated that fact table
> with some test data.  No problems.
>
> So, what is the next steps to get a basic date drill-down?
>
> I tried to setup the standard date dimension table 'rake
> warehouse:build_date_dimension' but get a unitialized constant
> DateDimension.  Looking through the plugin, I can see
> builder/date_dimension_builder.rb is in the require path/chain from init.rb
>
> Suggestions?  Is anyone running AW with rails 2.3.2?
>
> Thanks!
> John
> _______________________________________________
> Activewarehouse-discuss mailing list
> Activewarehouse-discuss@rubyforge.org
> http://rubyforge.org/mailman/listinfo/activewarehouse-discuss
>
>
>
_______________________________________________
Activewarehouse-discuss mailing list
Activewarehouse-discuss@rubyforge.org
http://rubyforge.org/mailman/listinfo/activewarehouse-discuss

Reply via email to