Class: Chronicle::ETL::JSONExtractor
Instance Attribute Summary
#connector_registration
Instance Method Summary
collapse
#filenames, #pathnames, #read_from_files?, #read_from_stdin?, #read_input, #read_input_as_lines
Methods inherited from Extractor
#initialize
#register_connector
included
Instance Method Details
24
25
26
27
28
|
# File 'lib/chronicle/etl/extractors/json_extractor.rb', line 24
def
@jsons.each do |json|
yield Chronicle::ETL::Extraction.new(data: json)
end
end
|
#prepare ⇒ Object
16
17
18
19
20
21
22
|
# File 'lib/chronicle/etl/extractors/json_extractor.rb', line 16
def prepare
@jsons = []
load_input do |input|
data = parse_data(input)
@jsons += [data].flatten
end
end
|
#results_count ⇒ Object
30
31
32
|
# File 'lib/chronicle/etl/extractors/json_extractor.rb', line 30
def results_count
@jsons.count
end
|