class RedshiftConnector::Reader::RedshiftCSV

Reads CSV file generated by Redshift UNLOAD statement (with option ADDQUOTES ESCAPE). UNLOAD escapes data by '' (backslash character), we cannot use standard CSV class.

Public Class Methods

data_object?(key) click to toggle source
# File lib/redshift_connector/reader/redshift_csv.rb, line 12
def self.data_object?(key)
  /\.csv(?:\.|\z)/ =~ File.basename(key)
end
new(f) click to toggle source
f

IO

# File lib/redshift_connector/reader/redshift_csv.rb, line 17
def initialize(f)
  @f = f
  @csv = RedshiftCsvFile.new(@f)
end