activewarehouse 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. data/README +27 -14
  2. data/Rakefile +16 -5
  3. data/doc/references.txt +4 -0
  4. data/generators/bridge/templates/migration.rb +9 -2
  5. data/generators/bridge/templates/unit_test.rb +8 -0
  6. data/generators/date_dimension/USAGE +1 -0
  7. data/generators/date_dimension/date_dimension_generator.rb +16 -0
  8. data/generators/date_dimension/templates/fixture.yml +5 -0
  9. data/generators/date_dimension/templates/migration.rb +31 -0
  10. data/generators/date_dimension/templates/model.rb +3 -0
  11. data/generators/date_dimension/templates/unit_test.rb +8 -0
  12. data/generators/dimension/templates/migration.rb +1 -10
  13. data/generators/dimension_view/dimension_view_generator.rb +2 -2
  14. data/generators/dimension_view/templates/migration.rb +8 -2
  15. data/generators/fact/templates/migration.rb +2 -0
  16. data/generators/time_dimension/USAGE +1 -0
  17. data/generators/time_dimension/templates/fixture.yml +5 -0
  18. data/generators/time_dimension/templates/migration.rb +12 -0
  19. data/generators/time_dimension/templates/model.rb +3 -0
  20. data/generators/time_dimension/templates/unit_test.rb +8 -0
  21. data/generators/time_dimension/time_dimension_generator.rb +14 -0
  22. data/lib/active_warehouse.rb +13 -2
  23. data/lib/active_warehouse/aggregate.rb +54 -253
  24. data/lib/active_warehouse/aggregate/dwarf/node.rb +36 -0
  25. data/lib/active_warehouse/aggregate/dwarf_aggregate.rb +369 -0
  26. data/lib/active_warehouse/aggregate/dwarf_common.rb +44 -0
  27. data/lib/active_warehouse/aggregate/dwarf_printer.rb +34 -0
  28. data/lib/active_warehouse/aggregate/no_aggregate.rb +194 -0
  29. data/lib/active_warehouse/aggregate/pid_aggregate.rb +29 -0
  30. data/lib/active_warehouse/aggregate/pipelined_rolap_aggregate.rb +129 -0
  31. data/lib/active_warehouse/aggregate/rolap_aggregate.rb +181 -0
  32. data/lib/active_warehouse/aggregate/rolap_common.rb +89 -0
  33. data/lib/active_warehouse/aggregate/templates/pipelined_rollup_1.sql +12 -0
  34. data/lib/active_warehouse/aggregate/templates/pipelined_rollup_10.sql +7166 -0
  35. data/lib/active_warehouse/aggregate/templates/pipelined_rollup_11.sql +14334 -0
  36. data/lib/active_warehouse/aggregate/templates/pipelined_rollup_12.sql +28670 -0
  37. data/lib/active_warehouse/aggregate/templates/pipelined_rollup_13.sql +57342 -0
  38. data/lib/active_warehouse/aggregate/templates/pipelined_rollup_2.sql +26 -0
  39. data/lib/active_warehouse/aggregate/templates/pipelined_rollup_3.sql +54 -0
  40. data/lib/active_warehouse/aggregate/templates/pipelined_rollup_4.sql +110 -0
  41. data/lib/active_warehouse/aggregate/templates/pipelined_rollup_5.sql +222 -0
  42. data/lib/active_warehouse/aggregate/templates/pipelined_rollup_6.sql +446 -0
  43. data/lib/active_warehouse/aggregate/templates/pipelined_rollup_7.sql +894 -0
  44. data/lib/active_warehouse/aggregate/templates/pipelined_rollup_8.sql +1790 -0
  45. data/lib/active_warehouse/aggregate/templates/pipelined_rollup_9.sql +3582 -0
  46. data/lib/active_warehouse/aggregate_field.rb +49 -0
  47. data/lib/active_warehouse/{dimension/bridge.rb → bridge.rb} +7 -3
  48. data/lib/active_warehouse/bridge/hierarchy_bridge.rb +46 -0
  49. data/lib/active_warehouse/builder.rb +2 -1
  50. data/lib/active_warehouse/builder/date_dimension_builder.rb +5 -2
  51. data/lib/active_warehouse/builder/generator/generator.rb +13 -0
  52. data/lib/active_warehouse/builder/generator/name_generator.rb +20 -0
  53. data/lib/active_warehouse/builder/generator/paragraph_generator.rb +11 -0
  54. data/lib/active_warehouse/builder/random_data_builder.rb +21 -11
  55. data/lib/active_warehouse/builder/test_data_builder.rb +54 -0
  56. data/lib/active_warehouse/calculated_field.rb +27 -0
  57. data/lib/active_warehouse/compat/compat.rb +4 -4
  58. data/lib/active_warehouse/cube.rb +126 -225
  59. data/lib/active_warehouse/cube_query_result.rb +69 -0
  60. data/lib/active_warehouse/dimension.rb +64 -29
  61. data/lib/active_warehouse/dimension/date_dimension.rb +15 -0
  62. data/lib/active_warehouse/dimension/dimension_reflection.rb +21 -0
  63. data/lib/active_warehouse/dimension/dimension_view.rb +17 -2
  64. data/lib/active_warehouse/dimension/hierarchical_dimension.rb +43 -5
  65. data/lib/active_warehouse/dimension/slowly_changing_dimension.rb +22 -12
  66. data/lib/active_warehouse/fact.rb +119 -40
  67. data/lib/active_warehouse/field.rb +74 -0
  68. data/lib/active_warehouse/ordered_hash.rb +34 -0
  69. data/lib/active_warehouse/prejoin_fact.rb +97 -0
  70. data/lib/active_warehouse/report/abstract_report.rb +40 -14
  71. data/lib/active_warehouse/report/chart_report.rb +3 -3
  72. data/lib/active_warehouse/report/table_report.rb +8 -3
  73. data/lib/active_warehouse/version.rb +1 -1
  74. data/lib/active_warehouse/view/report_helper.rb +144 -34
  75. data/tasks/active_warehouse_tasks.rake +28 -10
  76. metadata +107 -30
@@ -1,6 +1,6 @@
1
- module ActiveWarehouse
2
- module Report
3
- class ChartReport < ActiveRecord::Base
1
+ module ActiveWarehouse #:nodoc:
2
+ module Report #:nodoc:
3
+ class ChartReport < ActiveRecord::Base #:nodoc:
4
4
  include AbstractReport
5
5
  before_save :to_storage
6
6
  after_save :from_storage
@@ -1,20 +1,25 @@
1
- module ActiveWarehouse
2
- module Report
1
+ module ActiveWarehouse #:nodoc:
2
+ module Report #:nodoc:
3
3
  # A report which is used to represent a tabular report.
4
4
  class TableReport < ActiveRecord::Base
5
5
  include AbstractReport
6
6
  before_save :to_storage
7
7
  after_save :from_storage
8
- attr_accessor :format, :link_cell, :html_params
8
+ attr_accessor :format
9
+ attr_accessor :link_cell
10
+ attr_accessor :html_params
9
11
 
12
+ # Get any format options
10
13
  def format
11
14
  @format ||= {}
12
15
  end
13
16
 
17
+ # Set to true if cells should be linked
14
18
  def link_cell
15
19
  @link_cell ||= false
16
20
  end
17
21
 
22
+ # Hash of HTML parameters
18
23
  def html_params
19
24
  @html_params ||= {}
20
25
  end
@@ -1,7 +1,7 @@
1
1
  module ActiveWarehouse #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
- MINOR = 2
4
+ MINOR = 3
5
5
  TINY = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
@@ -1,3 +1,4 @@
1
+ # Helper module for rendering reports.
1
2
  module ReportHelper
2
3
 
3
4
  # Render the report.
@@ -26,12 +27,16 @@ module ReportHelper
26
27
 
27
28
  column_hierarchy = report.column_hierarchy
28
29
  column_hierarchy_constraints = report.column_constraints
30
+ column_filters = report.column_filters
29
31
 
30
32
  row_hierarchy = report.row_hierarchy
31
33
  row_hierarchy_constraints = report.row_constraints
34
+ row_filters = report.row_filters
32
35
 
33
36
  fact_attributes = report.fact_attributes
34
37
 
38
+ conditions = report.conditions
39
+
35
40
  html_params = report.html_params
36
41
 
37
42
  cstage = (params[:cstage] || report.column_stage).to_i
@@ -44,11 +49,31 @@ module ReportHelper
44
49
  format = report.format
45
50
 
46
51
  # Get the dimension instances
47
- col_dims = find_column_dimensions(column_dimension_class, column_hierarchy, cstage, col_param_prefix)
48
- row_dims = find_row_dimensions(row_dimension_class, row_hierarchy, rstage, row_param_prefix)
52
+ #col_dims = find_column_dimensions(column_dimension_class, column_hierarchy, cstage, col_param_prefix)
53
+ #row_dims = find_row_dimensions(row_dimension_class, row_hierarchy, rstage, row_param_prefix)
54
+
55
+ # Get the filters
56
+ filters = {}
57
+ params.each do |key, value|
58
+ if key =~ /^#{col_param_prefix}_(.*)/
59
+ filters["#{column_dimension}.#{$1}"] = value
60
+ end
61
+ if key =~ /^#{row_param_prefix}_(.*)/
62
+ filters["#{row_dimension}.#{$1}"] = value
63
+ end
64
+ end
49
65
 
50
- # Get the aggregate map
51
- agg_map = cube.aggregate_map(column_dimension, column_hierarchy, row_dimension, row_hierarchy, cstage, rstage)
66
+ # Query the cube
67
+ query_result = cube.query(
68
+ :column_dimension_name => column_dimension,
69
+ :column_hierarchy_name => column_hierarchy,
70
+ :row_dimension_name => row_dimension,
71
+ :row_hierarchy_name => row_hierarchy,
72
+ :conditions => conditions,
73
+ :cstage => cstage,
74
+ :rstage => rstage,
75
+ :filters => filters
76
+ )
52
77
 
53
78
  table_attributes = {}
54
79
  table_attributes[:class] = html_options[:report_class] ||= 'report'
@@ -58,6 +83,27 @@ module ReportHelper
58
83
  col_group = column_dimension_class.hierarchy(column_hierarchy)[cstage]
59
84
  row_group = row_dimension_class.hierarchy(row_hierarchy)[rstage]
60
85
 
86
+ #puts "col group: #{col_group.inspect}"
87
+
88
+ drill_down_col_dim_values = find_column_dimension_values(column_dimension_class, column_hierarchy, cstage, col_param_prefix)
89
+ drill_down_row_dim_values = find_row_dimension_values(row_dimension_class, row_hierarchy, rstage, row_param_prefix)
90
+
91
+ col_dim_values = column_dimension_class.available_values(col_group).collect { |v| v.to_s }
92
+ row_dim_values = row_dimension_class.available_values(row_group).collect { |v| v.to_s }
93
+ #puts "col dim values: #{col_dim_values.inspect}"
94
+
95
+ col_dim_values = col_dim_values.delete_if{ |v| !drill_down_col_dim_values.include?(v) }
96
+ row_dim_values = row_dim_values.delete_if{ |v| !drill_down_row_dim_values.include?(v) }
97
+
98
+ if column_filters[col_group] && column_filters[col_group].length > 0
99
+ col_dim_values = col_dim_values.delete_if{ |v| !column_filters[col_group].include?(v) }
100
+ end
101
+ if row_filters[row_group] && row_filters[row_group].length > 0
102
+ row_dim_values = row_dim_values.delete_if{ |v| !row_filters[row_group].include?(v) }
103
+ end
104
+
105
+ #puts "col dim values: #{col_dim_values.inspect}"
106
+
61
107
  # build the paths back to the top of the two dimension hierarchies
62
108
  col_path = []
63
109
  row_path = []
@@ -77,8 +123,7 @@ module ReportHelper
77
123
  x.table(table_attributes) do |x|
78
124
  x.tr do |x| # column dimension
79
125
  x.th
80
- col_dims.each do |col_dim|
81
- col_dim_value = col_dim.send(col_group)
126
+ col_dim_values.each do |col_dim_value|
82
127
  x.th({:colspan => fact_attributes.length}) do |x|
83
128
  x << link_to_if((cstage < col_hierarchy_length - 1), col_dim_value, {
84
129
  :cstage => cstage + 1,
@@ -90,17 +135,21 @@ module ReportHelper
90
135
 
91
136
  x.tr do |x| # aggregated fact headers
92
137
  x.th
93
- col_dims.each do |col_dim|
138
+ col_dim_values.each do |col_dim_value|
94
139
  #fact_class.aggregate_fields.each do |field_name, options|
95
140
  # x.th(options[:label].to_s || field_name.to_s.humanize)
96
141
  fact_attributes.each do |fact_attribute|
97
- x.th(fact_attribute.to_s.humanize.titleize) # TODO replace with sortable column header
142
+ case fact_attribute
143
+ when Symbol, String
144
+ fact_attribute = fact_class.field_for_name(fact_attribute.to_s.dup)
145
+ raise "Field name #{field_name} not defined in the fact #{fact_class}" if fact_attribute.nil?
146
+ end
147
+ x.th(fact_attribute.label.humanize.titleize) # TODO replace with sortable column header
98
148
  end
99
149
  end
100
150
  end
101
151
 
102
- row_dims.each do |row_dim| # rows
103
- row_dim_value = row_dim.send(row_group)
152
+ row_dim_values.each do |row_dim_value| # rows
104
153
  cell_row_path = row_path + [row_dim_value]
105
154
  x.tr do |x|
106
155
  x.td do |x| # row dimension label
@@ -110,25 +159,47 @@ module ReportHelper
110
159
  "#{row_param_prefix}_#{row_group}" => row_dim_value}.merge(cube_params).merge(html_params))
111
160
  end
112
161
 
113
- col_dims.each do |col_dim| # aggregated facts
114
- col_dim_value = col_dim.send(col_group)
162
+ col_dim_values.each do |col_dim_value| # aggregated facts
115
163
  cell_col_path = col_path + [col_dim_value]
116
164
  fact_attributes.each_with_index do |fact_attribute, index|
117
165
  x.td do |x|
118
- #puts "Row path (length=#{cell_row_path.length}): #{cell_row_path.join(':')}"
119
- #puts "Col path (length=#{cell_col_path.length}): #{cell_col_path.join(':')}"
166
+ # If a list of fact attributes to be displayed is defined then pull them
167
+ # out of the fact class
168
+ case fact_attribute
169
+ when Symbol, String
170
+ field_name = fact_attribute.to_s.dup
171
+ fact_attribute = fact_class.field_for_name(fact_attribute)
172
+ if fact_attribute.nil?
173
+ raise "Field name #{field_name} not defined in the fact #{fact_class}"
174
+ end
175
+ end
176
+
177
+ # Get the value
178
+ value = ''
179
+ case fact_attribute
180
+ when ActiveWarehouse::AggregateField
181
+ value = query_result.value(cell_row_path.last, cell_col_path.last, fact_attribute.label)
182
+ when ActiveWarehouse::CalculatedField
183
+ value = fact_attribute.calculate(query_result.values(cell_row_path.last, cell_col_path.last))
184
+ end
120
185
 
121
- block = format[fact_attribute.to_sym]
122
- value = agg_map.value(cell_row_path.join(':'), cell_col_path.join(':'), index).to_s
123
- value = block.call(value) if block
186
+ # Handle custom formatting if a formatting block is defined
187
+ block = format[fact_attribute.name.to_sym]
188
+ if block
189
+ value = block.call(value)
190
+ else
191
+ value = value.to_s
192
+ end
124
193
 
125
- x << link_to_if((cstage < col_hierarchy_length - 1 and rstage < row_hierarchy_length - 1 and link_cell),
126
- #agg_map[row_path.join(':')][col_path.join(':')][index].to_s, {
194
+ x << link_to_if(
195
+ (cstage < col_hierarchy_length - 1 && rstage < row_hierarchy_length - 1 && link_cell),
127
196
  value, {
128
- :cstage => cstage + 1,
129
- :rstage => rstage + 1,
130
- "#{col_param_prefix}_#{col_group}" => col_dim_value,
131
- "#{row_param_prefix}_#{row_group}" => row_dim_value}.merge(cube_params).merge(html_params))
197
+ :cstage => cstage + 1,
198
+ :rstage => rstage + 1,
199
+ "#{col_param_prefix}_#{col_group}" => col_dim_value,
200
+ "#{row_param_prefix}_#{row_group}" => row_dim_value
201
+ }.merge(cube_params).merge(html_params)
202
+ )
132
203
  end
133
204
  end
134
205
  end
@@ -153,10 +224,18 @@ module ReportHelper
153
224
  find_dimensions(dimension_class, hierarchy, current_stage, param_prefix)
154
225
  end
155
226
 
227
+ def find_column_dimension_values(dimension_class, hierarchy, current_stage, param_prefix='c')
228
+ find_dimension_values(dimension_class, hierarchy, current_stage, param_prefix)
229
+ end
230
+
156
231
  def find_row_dimensions(dimension_class, hierarchy, current_stage, param_prefix='r')
157
232
  find_dimensions(dimension_class, hierarchy, current_stage, param_prefix)
158
233
  end
159
234
 
235
+ def find_row_dimension_values(dimension_class, hierarchy, current_stage, param_prefix='r')
236
+ find_dimension_values(dimension_class, hierarchy, current_stage, param_prefix)
237
+ end
238
+
160
239
  def find_dimensions(dimension_class, hierarchy, current_stage, param_prefix)
161
240
  # Construct the column find options
162
241
  find_options = {}
@@ -179,6 +258,37 @@ module ReportHelper
179
258
  dimension_class.find(:all, find_options)
180
259
  end
181
260
 
261
+ def find_dimension_values(dimension_class, hierarchy, current_stage, param_prefix)
262
+ # Construct the column find options
263
+ find_options = {}
264
+ group_by = []
265
+ conditions_sql = []
266
+ conditions_args = []
267
+ current_stage.to_i.downto(0) do |stage|
268
+ level = dimension_class.hierarchy(hierarchy)[stage]
269
+ group_by << level
270
+ unless stage == current_stage
271
+ param_name = "#{param_prefix}_#{level}"
272
+ conditions_sql << "#{level} = '#{params[param_name]}'" # TODO protect against injection
273
+ else
274
+ find_options[:select] = level
275
+ end
276
+ end
277
+
278
+ find_options[:conditions] = nil
279
+ find_options[:conditions] = conditions_sql.join(" AND ") if conditions_sql.length > 0
280
+ find_options[:group] = find_options[:order] = group_by.join(',')
281
+
282
+ q = "SELECT #{find_options[:select]} FROM #{dimension_class.table_name}"
283
+ q << " WHERE #{find_options[:conditions]}" if find_options[:conditions]
284
+ q << " GROUP BY #{find_options[:group]}" if find_options[:group]
285
+ q << " ORDER BY #{find_options[:order]}" if find_options[:order]
286
+
287
+ puts "query: #{q}"
288
+
289
+ dimension_class.connection.select_values(q)
290
+ end
291
+
182
292
  public
183
293
  # Create a sortable column header.
184
294
  #
@@ -194,17 +304,17 @@ module ReportHelper
194
304
  def sortable_column_header(column_name, order_by, link_parameters={}, attributes={}) # TODO get this thing back into the mix
195
305
  order = 'desc'
196
306
  if params[:order_by].to_s == order_by.to_s
197
- sorted = 'sorted'
198
- if params[:order] == 'desc' || params[:order].nil?
199
- order_css_class = 'order_down'
200
- order = 'asc'
201
- elsif params[:order] == 'asc'
202
- order_css_class = 'order_up'
203
- order = 'desc'
204
- end
205
- else
206
- sorted = ''
207
- end
307
+ sorted = 'sorted'
308
+ if params[:order] == 'desc' || params[:order].nil?
309
+ order_css_class = 'order_down'
310
+ order = 'asc'
311
+ elsif params[:order] == 'asc'
312
+ order_css_class = 'order_up'
313
+ order = 'desc'
314
+ end
315
+ else
316
+ sorted = ''
317
+ end
208
318
 
209
319
  attributes.merge!({:class => "sortable #{sorted} #{order_css_class}"})
210
320
  x.th(attributes) do |th|
@@ -16,6 +16,11 @@ namespace :warehouse do
16
16
  start_date = (ENV['START_DATE'] ? Time.parse(ENV['START_DATE']) : Time.now.years_ago(5))
17
17
  end_date = (ENV['END_DATE'] ? Time.parse(ENV['END_DATE']) : Time.now )
18
18
 
19
+ if ENV['TRUNCATE']
20
+ puts "Truncating date dimension"
21
+ DateDimension.connection.execute("TRUNCATE TABLE date_dimension")
22
+ end
23
+
19
24
  puts "Building date dimension"
20
25
 
21
26
  ddb = ActiveWarehouse::Builder::DateDimensionBuilder.new(start_date, end_date)
@@ -34,18 +39,26 @@ namespace :warehouse do
34
39
  ActiveRecord::Base.establish_connection(abcs[RAILS_ENV])
35
40
  require 'pp'
36
41
 
37
- truncate = true if ENV['TRUNCATE']
38
42
  name = ENV['NAME']
43
+ options = {}
44
+ options[:truncate] = true if ENV['TRUNCATE']
45
+ options[:facts] = ENV['FACTS'].to_i if ENV['FACTS']
46
+ options[:dimensions] = ENV['DIMENSIONS'].to_i if ENV['DIMENSIONS']
39
47
 
40
48
  if name
41
- build_and_load(name, truncate)
49
+ build_and_load(name, options)
42
50
  else
43
51
  models_dir = File.join(File.dirname(__FILE__), '../../../../app/models')
44
- Dir.glob(File.join(models_dir, "**", "*.rb")).each do |f|
52
+ Dir.glob(File.join(models_dir, "**", "*_dimension.rb")).each do |f|
45
53
  name = File.basename(f, '.rb')
46
- next unless name =~ /_dimension$|_fact$/
47
54
  next if name == 'date_dimension'
48
- build_and_load(name)
55
+ options[:rows] = options[:dimensions]
56
+ build_and_load(name, options)
57
+ end
58
+ Dir.glob(File.join(models_dir, "**", "*_fact.rb")).each do |f|
59
+ name = File.basename(f, '.rb')
60
+ options[:rows] = options[:facts]
61
+ build_and_load(name, options)
49
62
  end
50
63
  end
51
64
  end
@@ -88,14 +101,19 @@ namespace :warehouse do
88
101
  end
89
102
  end
90
103
 
91
- def build_and_load(name, truncate=false)
104
+ def build_and_load(name, options)
92
105
  builder = ActiveWarehouse::Builder::RandomDataBuilder.new
93
- puts "Building #{name}"
106
+
94
107
  clazz = name.classify.constantize
95
- if truncate # TODO: Handle through adapter by adding a truncate method to the adapter
96
- clazz.connection.execute("TRUNCATE #{clazz.table_name}")
108
+ if options[:truncate] # TODO: Handle through adapter by adding a truncate method to the adapter
109
+ puts "Truncating #{name}"
110
+ clazz.connection.execute("TRUNCATE TABLE #{clazz.table_name}")
97
111
  end
98
- options = {:fk_limit => {'date_id' => DateDimension.count}}
112
+
113
+ options[:fk_limit] = {}
114
+ options[:fk_limit]['date_id'] = DateDimension.count
115
+
116
+ puts "Building #{name}"
99
117
  builder.build(name, options).each do |record|
100
118
  clazz.create(record)
101
119
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.0.10
2
+ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: activewarehouse
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.2.0
7
- date: 2007-02-18 00:00:00 -05:00
6
+ version: 0.3.0
7
+ date: 2007-05-13 00:00:00 -04:00
8
8
  summary: Build data warehouses with Rails.
9
9
  require_paths:
10
10
  - lib
@@ -36,74 +36,133 @@ files:
36
36
  - Rakefile
37
37
  - db/migrations
38
38
  - db/migrations/001_create_table_reports.rb
39
+ - doc/references.txt
39
40
  - generators/bridge
40
- - generators/cube
41
- - generators/dimension
42
- - generators/dimension_view
43
- - generators/fact
44
41
  - generators/bridge/bridge_generator.rb
45
42
  - generators/bridge/templates
46
- - generators/bridge/USAGE
47
43
  - generators/bridge/templates/fixture.yml
48
44
  - generators/bridge/templates/migration.rb
49
45
  - generators/bridge/templates/model.rb
46
+ - generators/bridge/templates/unit_test.rb
47
+ - generators/bridge/USAGE
48
+ - generators/cube
50
49
  - generators/cube/cube_generator.rb
51
50
  - generators/cube/templates
52
- - generators/cube/USAGE
53
51
  - generators/cube/templates/model.rb
54
52
  - generators/cube/templates/unit_test.rb
53
+ - generators/cube/USAGE
54
+ - generators/date_dimension
55
+ - generators/date_dimension/date_dimension_generator.rb
56
+ - generators/date_dimension/templates
57
+ - generators/date_dimension/templates/fixture.yml
58
+ - generators/date_dimension/templates/migration.rb
59
+ - generators/date_dimension/templates/model.rb
60
+ - generators/date_dimension/templates/unit_test.rb
61
+ - generators/date_dimension/USAGE
62
+ - generators/dimension
55
63
  - generators/dimension/dimension_generator.rb
56
64
  - generators/dimension/templates
57
- - generators/dimension/USAGE
58
65
  - generators/dimension/templates/fixture.yml
59
66
  - generators/dimension/templates/migration.rb
60
67
  - generators/dimension/templates/model.rb
61
68
  - generators/dimension/templates/unit_test.rb
69
+ - generators/dimension/USAGE
70
+ - generators/dimension_view
62
71
  - generators/dimension_view/dimension_view_generator.rb
63
72
  - generators/dimension_view/templates
64
- - generators/dimension_view/USAGE
65
73
  - generators/dimension_view/templates/migration.rb
66
74
  - generators/dimension_view/templates/model.rb
67
75
  - generators/dimension_view/templates/unit_test.rb
76
+ - generators/dimension_view/USAGE
77
+ - generators/fact
68
78
  - generators/fact/fact_generator.rb
69
79
  - generators/fact/templates
70
- - generators/fact/USAGE
71
80
  - generators/fact/templates/fixture.yml
72
81
  - generators/fact/templates/migration.rb
73
82
  - generators/fact/templates/model.rb
74
83
  - generators/fact/templates/unit_test.rb
84
+ - generators/fact/USAGE
85
+ - generators/hierarchy
86
+ - generators/time_dimension
87
+ - generators/time_dimension/templates
88
+ - generators/time_dimension/templates/fixture.yml
89
+ - generators/time_dimension/templates/migration.rb
90
+ - generators/time_dimension/templates/model.rb
91
+ - generators/time_dimension/templates/unit_test.rb
92
+ - generators/time_dimension/time_dimension_generator.rb
93
+ - generators/time_dimension/USAGE
75
94
  - lib/active_warehouse
76
- - lib/active_warehouse.rb
95
+ - lib/active_warehouse/aggregate
96
+ - lib/active_warehouse/aggregate/dwarf
97
+ - lib/active_warehouse/aggregate/dwarf/node.rb
98
+ - lib/active_warehouse/aggregate/dwarf_aggregate.rb
99
+ - lib/active_warehouse/aggregate/dwarf_common.rb
100
+ - lib/active_warehouse/aggregate/dwarf_printer.rb
101
+ - lib/active_warehouse/aggregate/no_aggregate.rb
102
+ - lib/active_warehouse/aggregate/pid_aggregate.rb
103
+ - lib/active_warehouse/aggregate/pipelined_rolap_aggregate.rb
104
+ - lib/active_warehouse/aggregate/rolap_aggregate.rb
105
+ - lib/active_warehouse/aggregate/rolap_common.rb
106
+ - lib/active_warehouse/aggregate/templates
107
+ - lib/active_warehouse/aggregate/templates/pipelined_rollup_1.sql
108
+ - lib/active_warehouse/aggregate/templates/pipelined_rollup_10.sql
109
+ - lib/active_warehouse/aggregate/templates/pipelined_rollup_11.sql
110
+ - lib/active_warehouse/aggregate/templates/pipelined_rollup_12.sql
111
+ - lib/active_warehouse/aggregate/templates/pipelined_rollup_13.sql
112
+ - lib/active_warehouse/aggregate/templates/pipelined_rollup_2.sql
113
+ - lib/active_warehouse/aggregate/templates/pipelined_rollup_3.sql
114
+ - lib/active_warehouse/aggregate/templates/pipelined_rollup_4.sql
115
+ - lib/active_warehouse/aggregate/templates/pipelined_rollup_5.sql
116
+ - lib/active_warehouse/aggregate/templates/pipelined_rollup_6.sql
117
+ - lib/active_warehouse/aggregate/templates/pipelined_rollup_7.sql
118
+ - lib/active_warehouse/aggregate/templates/pipelined_rollup_8.sql
119
+ - lib/active_warehouse/aggregate/templates/pipelined_rollup_9.sql
77
120
  - lib/active_warehouse/aggregate.rb
121
+ - lib/active_warehouse/aggregate_field.rb
122
+ - lib/active_warehouse/bridge
123
+ - lib/active_warehouse/bridge/hierarchy_bridge.rb
124
+ - lib/active_warehouse/bridge.rb
78
125
  - lib/active_warehouse/builder
126
+ - lib/active_warehouse/builder/date_dimension_builder.rb
127
+ - lib/active_warehouse/builder/generator
128
+ - lib/active_warehouse/builder/generator/generator.rb
129
+ - lib/active_warehouse/builder/generator/name_generator.rb
130
+ - lib/active_warehouse/builder/generator/paragraph_generator.rb
131
+ - lib/active_warehouse/builder/random_data_builder.rb
132
+ - lib/active_warehouse/builder/test_data_builder.rb
79
133
  - lib/active_warehouse/builder.rb
134
+ - lib/active_warehouse/calculated_field.rb
80
135
  - lib/active_warehouse/compat
136
+ - lib/active_warehouse/compat/compat.rb
81
137
  - lib/active_warehouse/core_ext
138
+ - lib/active_warehouse/core_ext/time
139
+ - lib/active_warehouse/core_ext/time/calculations.rb
140
+ - lib/active_warehouse/core_ext/time.rb
82
141
  - lib/active_warehouse/core_ext.rb
83
142
  - lib/active_warehouse/cube.rb
143
+ - lib/active_warehouse/cube_query_result.rb
84
144
  - lib/active_warehouse/dimension
145
+ - lib/active_warehouse/dimension/date_dimension.rb
146
+ - lib/active_warehouse/dimension/dimension_reflection.rb
147
+ - lib/active_warehouse/dimension/dimension_view.rb
148
+ - lib/active_warehouse/dimension/hierarchical_dimension.rb
149
+ - lib/active_warehouse/dimension/slowly_changing_dimension.rb
85
150
  - lib/active_warehouse/dimension.rb
86
151
  - lib/active_warehouse/fact.rb
152
+ - lib/active_warehouse/field.rb
87
153
  - lib/active_warehouse/migrations.rb
154
+ - lib/active_warehouse/ordered_hash.rb
155
+ - lib/active_warehouse/prejoin_fact.rb
88
156
  - lib/active_warehouse/report
89
- - lib/active_warehouse/report.rb
90
- - lib/active_warehouse/version.rb
91
- - lib/active_warehouse/view
92
- - lib/active_warehouse/view.rb
93
- - lib/active_warehouse/builder/date_dimension_builder.rb
94
- - lib/active_warehouse/builder/random_data_builder.rb
95
- - lib/active_warehouse/compat/compat.rb
96
- - lib/active_warehouse/core_ext/time
97
- - lib/active_warehouse/core_ext/time.rb
98
- - lib/active_warehouse/core_ext/time/calculations.rb
99
- - lib/active_warehouse/dimension/bridge.rb
100
- - lib/active_warehouse/dimension/dimension_view.rb
101
- - lib/active_warehouse/dimension/hierarchical_dimension.rb
102
- - lib/active_warehouse/dimension/slowly_changing_dimension.rb
103
157
  - lib/active_warehouse/report/abstract_report.rb
104
158
  - lib/active_warehouse/report/chart_report.rb
105
159
  - lib/active_warehouse/report/table_report.rb
160
+ - lib/active_warehouse/report.rb
161
+ - lib/active_warehouse/version.rb
162
+ - lib/active_warehouse/view
106
163
  - lib/active_warehouse/view/report_helper.rb
164
+ - lib/active_warehouse/view.rb
165
+ - lib/active_warehouse.rb
107
166
  - tasks/active_warehouse_tasks.rake
108
167
  test_files: []
109
168
 
@@ -128,6 +187,15 @@ dependencies:
128
187
  - !ruby/object:Gem::Version
129
188
  version: 0.7.1
130
189
  version:
190
+ - !ruby/object:Gem::Dependency
191
+ name: fastercsv
192
+ version_requirement:
193
+ version_requirements: !ruby/object:Gem::Version::Requirement
194
+ requirements:
195
+ - - ">="
196
+ - !ruby/object:Gem::Version
197
+ version: 1.1.0
198
+ version:
131
199
  - !ruby/object:Gem::Dependency
132
200
  name: activesupport
133
201
  version_requirement:
@@ -135,7 +203,7 @@ dependencies:
135
203
  requirements:
136
204
  - - ">="
137
205
  - !ruby/object:Gem::Version
138
- version: 1.3.1.5618
206
+ version: 1.3.1
139
207
  version:
140
208
  - !ruby/object:Gem::Dependency
141
209
  name: activerecord
@@ -144,7 +212,7 @@ dependencies:
144
212
  requirements:
145
213
  - - ">="
146
214
  - !ruby/object:Gem::Version
147
- version: 1.14.4.5618
215
+ version: 1.14.4
148
216
  version:
149
217
  - !ruby/object:Gem::Dependency
150
218
  name: actionpack
@@ -153,7 +221,7 @@ dependencies:
153
221
  requirements:
154
222
  - - ">="
155
223
  - !ruby/object:Gem::Version
156
- version: 1.12.5.5618
224
+ version: 1.12.5
157
225
  version:
158
226
  - !ruby/object:Gem::Dependency
159
227
  name: rails_sql_views
@@ -164,3 +232,12 @@ dependencies:
164
232
  - !ruby/object:Gem::Version
165
233
  version: 0.1.0
166
234
  version:
235
+ - !ruby/object:Gem::Dependency
236
+ name: adapter_extensions
237
+ version_requirement:
238
+ version_requirements: !ruby/object:Gem::Version::Requirement
239
+ requirements:
240
+ - - ">="
241
+ - !ruby/object:Gem::Version
242
+ version: 0.1.0
243
+ version: