Method: Fluent::Plugin::CSVParser#parse

Defined in:
lib/fluent/plugin/parser_csv.rb

#parse(text) {|time, record| ... } ⇒ Object

Yields:

  • (time, record)


48
49
50
51
52
53
# File 'lib/fluent/plugin/parser_csv.rb', line 48

def parse(text, &block)
  values = CSV.parse_line(text, col_sep: @delimiter)
  r = Hash[@keys.zip(values)]
  time, record = convert_values(parse_time(r), r)
  yield time, record
end