CSV Filter - Quote character parse failure

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!

Regards,
N

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.

Regards,
N

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