module ETL #:nodoc: module Transform #:nodoc: # Transform which will replace nil or empty values with a specified value. class DefaultTransform < Transform attr_accessor :default_value def initialize(control, configuration) super @default_value = configuration[:default_value] end def transform(name, value, row) value.blank? ? default_value : value end end end end