Class: ActiveWarehouse::Aggregate::PipelinedRolapAggregate

Inherits:
Aggregate
  • Object
show all
Includes:
RolapCommon
Defined in:
lib/active_warehouse/aggregate/pipelined_rolap_aggregate.rb

Overview

A Pipelined implementation of a ROLAP engine that stores all possible combinations of fact and dimensional values for a specific cube.

This implementation attempts to reduce the amount of work required by aggregating facts in a pipelined fashion. This means that smaller aggregates are generated from a preceding aggregate, in order to avoid having to query the entire raw data set for every aggregate.

E.g.

ABCD -> ABC -> AB -> A -> all

Instance Attribute Summary

Attributes inherited from Aggregate

#cube_class

Instance Method Summary collapse

Methods included from RolapCommon

#aggregate_fields, #aggregated_fact_column_sql, #dimensions_to_columns, #flat_table_name, #rollup_table_name, #tables_and_joins

Methods inherited from Aggregate

#initialize

Constructor Details

This class inherits a constructor from ActiveWarehouse::Aggregate::Aggregate

Instance Method Details

#populate(options = {}) ⇒ Object

Build and populate the data store



21
22
23
24
25
26
27
28
# File 'lib/active_warehouse/aggregate/pipelined_rolap_aggregate.rb', line 21

def populate(options={})
  create_and_populate_all_table
  create_all_pipelined_agg_tables
  create_insert_statements.each_with_index do |insert, i|
    next if i == 0 #handled by create_and_populate_all_table
    connection.transaction {connection.execute(insert)}
  end
end