I have a CSV file and the format is something like this:
"102","60","Open","I hope this works out for \"random.guy@gmail.com\""
When i parse this using the CSV filter i get the following error:
[2018-01-23T13:11:58,523][WARN ][logstash.filters.csv ] Error parsing csv {:field=>"message", :source=>"\"102\",\"60\",\"Open\",\"I hope this works out for \\\"random.guy@gmail.com\\\"\"", :exception=>#<CSV::MalformedCSVError: Missing or stray quote in line 1>}
Why is this an issue? The input seems to be perfectly quoted. Any insight would be appreciated!
For anyone suffering with this issue, it seems to be an issue with Ruby. I cannot confirm this, but i believe that since logstash is written in Ruby, this could be the cause of it.
Here is a reference question that was asked on stackoverflow which gives the exact same error as logstash:
I will open an issue on the plugin page just to confirm if this is indeed a bug. The current solution that I have for the issue is to use gsub to replace the\" characters with ' or null.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.