Module: Masamune::Transform::RollupFact

Extended by:
ActiveSupport::Concern
Included in:
Actions::Transform::Wrapper
Defined in:
lib/masamune/transform/rollup_fact.rb

Instance Method Summary collapse

Instance Method Details

#rollup_fact(source, target, date) ⇒ Object

Raises:

  • (ArgumentError)


27
28
29
30
31
# File 'lib/masamune/transform/rollup_fact.rb', line 27

def rollup_fact(source, target, date)
  raise ArgumentError, "#{source.name} must have date_column to rollup" unless source.date_column
  raise ArgumentError, "#{target.name} must have date_column to rollup" unless target.date_column
  Operator.new __method__, source: source.partition_table(date), target: target.partition_table(date)
end