Project

aggrobot

0.0
No commit activity in last 3 years
No release in over 3 years
Easy and performant aggregation for rails
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 0
>= 4.0
 Project Readme

Aggrobot

Aggrobot is an aggregation framework in Ruby. It provides a powerful DSL to perform aggregations over large dataset. It has been tested to work with MySQL, Postgres and SQLite.

Many other features are provided:

  • Bucketing over data ranges. For e.g. grouping orders over price ranges like 100-200, 200-300 and 300+
  • Grouping over top n groups. For e.g. group top 2 selling products based on quantity, while group rest of the products in a single bucket of others
  • Sub-aggregations (avg, sum, add, multiply, divide, percent, etc) on columns are also provided.

All the aggregations are calculated in the database and only the aggregated data is sent over to Ruby, to keep it performant. This greatly speeds up performance and reduces the memory requirement, had the aggregations been done directly in Ruby.

Aggrobot also allows nested aggregations and each level of aggregation can be passed around as a code block and used in higher level aggregations. This provides great amount of code-reuse.

Installation

Add this line to your application's Gemfile:

gem 'aggrobot'

And then execute:

$ bundle

Or install it yourself as:

$ gem install aggrobot

Usage

TODO: Write usage instructions here TODO: Write example usage here

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request