Class: Nfcollector::CategoryPartition

Inherits:
Partition
  • Object
show all
Defined in:
lib/nfcollector/category_partition.rb

Instance Attribute Summary

Attributes inherited from Partition

#account_id, #headers, #partition_id, #rows

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Partition

#add_row, #file_name, get_partitioner, #initialize, #table_name

Constructor Details

This class inherits a constructor from Nfcollector::Partition

Class Method Details

.partition_id(category_id) ⇒ Object

Calculates the ID for this partition Think of it as a statistical ‘bin’

In this case we just use the category id



9
10
11
# File 'lib/nfcollector/category_partition.rb', line 9

def self.partition_id(category_id)
  category_id
end

Instance Method Details

#keysObject



13
14
15
# File 'lib/nfcollector/category_partition.rb', line 13

def keys
  { account_id: , category_id: partition_id }
end