Mapper_parsing_exception for to_char date field



I am fetching data from db and I convert one of the date fields in my db to char like

TO_CHAR(processtime, 'DD-MM-YYYY hh:mm:ss.MIFF1 AM') as process_time

returns date like;

03-01-2017 03:01:50.320 PM

When I run Logstash, i am getting an error like;

[2017-01-24T18:28:02,044][WARN ][logstash.outputs.elasticsearch] Failed action. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"mylogs-2017-01-24", :_type=>"logs", :_routing=>nil}, 2017-01-24T12:58:01.893Z %{host} %{message}], :response=>{"index"=>{"_index"=>"mylogs-2017-01-24", "_type"=>"logs", "_id"=>"AVnQjfdV2fWIWeetSa-3", "status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"failed to parse [process_time]", "caused_by"=>{"type"=>"illegal_argument_exception", "reason"=>"Invalid format: \"02-01-2017 12:01:30\" is malformed at \"-01-2017 12:01:30\""}}}}}

Why is this happening? How can I fix this?

Thanks in advance.

(Magnus B├Ąck) #2

What's the current ES mapping of the process_time field?

(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.