wvanbergen / active_olap

OLAP extensions for ActiveRecord
http://wiki.github.com/wvanbergen/active_olap
MIT License
55 stars 7 forks source link

Exception on simple model #1

Open japetheape opened 14 years ago

japetheape commented 14 years ago

Hey Willem,

tried to use your plugin, but when doing on a simple model Ping, it raised an exception on

Ping.olap_drilldown(:created_daily => :period_1)

ActiveRecord::StatementInvalid: Mysql::Error: Unknown column '' in 'where clause': SELECT pings.* FROM pings WHERE (((>= '2009-11-22 00:00:00' AND < '2009-11-23 00:00:00') AND ((>= '2009-11-21 00:00:00' AND < '2009-12-05 00:00:00'))))

enable_active_olap do |olap|

Easily create a trend dimension

olap.dimension :created_daily, :trend => {
  :timestamp_field => :created_at,
  :period_length => 1.day, 
  :period_count => 20
}

end

sadowski commented 14 years ago

Yeah, after the first trend query it 'blanks' on all the column names. I noticed this too.