lib/chronicle/etl/loaders/loader.rb in chronicle-etl-0.5.5 vs lib/chronicle/etl/loaders/loader.rb in chronicle-etl-0.6.1
- old
+ new
@@ -30,26 +30,9 @@
raise NotImplementedError
end
# Called once there are no more records to process
def finish; end
-
- private
-
- def build_headers(records)
- headers =
- if @config.fields && @config.fields.any?
- Set[*@config.fields]
- else
- # use all the keys of the flattened record hash
- Set[*records.map(&:keys).flatten.map(&:to_s).uniq]
- end
-
- headers = headers.delete_if { |header| header.end_with?(*@config.fields_exclude) }
- headers = headers.first(@config.fields_limit) if @config.fields_limit
-
- headers.to_a.map(&:to_sym)
- end
end
end
end
require_relative 'csv_loader'