lib/etl/processor/check_unique_processor.rb in activewarehouse-etl-0.9.5.rc1 vs lib/etl/processor/check_unique_processor.rb in activewarehouse-etl-1.0.0.rc1

- old
+ new

@@ -21,10 +21,14 @@ @compound_key_constraints ||= {} end # Process the row. This implementation will only return a row if it # it's key combination has not already been seen. + # + # An error will be raised if the row doesn't include the keys. def process(row) + ensure_columns_available_in_row!(row, keys, 'for unicity check') + key = (keys.collect { |k| row[k] }).join('|') unless compound_key_constraints[key] compound_key_constraints[key] = 1 return row end \ No newline at end of file