I’m looking for a Rails ActiveRecord based Gem to provide data profiling so that I can trend changes in the data. Imagine:
class Report < ActiveRecord
scope :overdue, lambda { where :due_date <= Time.now }
profile_counts overdue, :frequency=>:nightly
end
The idea would be that the “profile_counts” method would append to some global data profiling table that would trend the count of late reports over time.
Please advise on gems, best practices etc.
Perhaps I don’t understand the question, but wouldn’t a simple cron job, run daily, do what you want?
where the trends table has only date (datetime) and overdue (integer) columns?
I guess that you can roll a plugin that will use Rufus::Scheduler or whenever gems, but it looks like an overkill to me.