Reporting on Rails - ActiveRecord and ROLAP Working Together
summary
ActiveRecord and ROLAP are shown working together: a lightweight active_reporting gem builds SQL metrics, returns arrays of hashes instead of AR objects, and hits Postgres with GROUP BY restrictions and date handling via a date dimension. Practical results include de‑normalizing dimensions, avoiding has_many aggregates, using counter caches or read replicas, and tuning with EXPLAIN ANALYZE. Version 0.1.1 exists and is used in production at scale with million+ device billing data.
AI-written summary · about
chapters (21)
- 0:00Intro
- 1:13The Scenario
- 2:01Couple notes...
- 2:46What is reporting ?
- 3:16What do you want to answer?
- 4:07What is "ROLAP"
- 6:04OLAP Terminology
- 6:32Fact Table/Model
- 8:17Dimension Hierarchy
- 9:09Dimension Members (Dimension Labels)
- 9:52Dimension Filters (or just "Filters")
- 10:35Measure
- 13:03Star Schema
- 15:54Dates as Dimensions
- 17:29Great! ActiveRecord can do all that.... right?
- 19:44Options?
- 22:54active_reporting - Dimensions
- 24:30active_reporting - Dimension Filters
- 26:11active_reporting - Metric
- 26:59active_reporting - Report
- 29:51Other Database Considerations
related talks
01h 52mBuild High Performance Active Record Apps
25mActiveRecord can't do it? Arel can!
01h 52mBuild High Performance Active Record Apps
21mActiveRecord can't do it? Arel can!
27mRediscovering ActiveRecord
21mBuilding a Performance Analytics Tool with ActiveSupport
29mActiveRecord, the Repository Pattern, and You
40mLevel-up Your ActiveRecord Skills: Learn SQL!
