Class: RedshiftConnector::AbstractDataFileBundle

Inherits:
Object
  • Object
show all
Defined in:
lib/redshift-connector/abstract_data_file_bundle.rb

Direct Known Subclasses

S3DataFileBundle, UrlDataFileBundle

Instance Method Summary collapse

Instance Method Details

#all_data_objectsObject



18
19
20
# File 'lib/redshift-connector/abstract_data_file_bundle.rb', line 18

def all_data_objects
  data_files.select {|obj| obj.data_object? }
end

#each_object(&block) ⇒ Object



11
12
13
14
15
16
# File 'lib/redshift-connector/abstract_data_file_bundle.rb', line 11

def each_object(&block)
  all_data_objects.each do |obj|
    @logger.info "processing s3 object: #{obj.key}"
    yield obj
  end
end

#each_row(&block) ⇒ Object Also known as: each



3
4
5
6
7
# File 'lib/redshift-connector/abstract_data_file_bundle.rb', line 3

def each_row(&block)
  each_object do |obj|
    obj.each_row(&block)
  end
end