Open slmzig opened 6 years ago
Please ask questions on the forum.
Cross-post of https://stackoverflow.com/questions/53543295/akka-stream-alpakka-csv-skip-exception-and-parse-next-rows
Currently CsvParsing.lineScanner() does not support supervision strategies. You can choose another symbol as a quote character for the line scanner CsvParsing.lineScanner(quoteChar = '\''). Then you will get the unclosed double quote as part of parsed results:
Map(email -> "test, country -> test, name -> test)
Map(email -> test, country -> test, name -> test)
Map(email -> test, country -> test, name -> test)
Supporting a supervision strategy for the CSV parser is non-trivial. It would need to understand how to get back to a stable state eg. a line end, just ignoring part of the input will not be so useful.
I`m using Alpakka for parsing csv files. version "com.lightbend.akka" %% "akka-stream-alpakka-csv" % 0.20 I have csv file with unclosed quote.
I want to skip bad rows and go next, but my stream is falling.
I`m using supervisionStrategy Supervision.Resume, but it is not working.
The stream fail when find unclosed quote.
Is there any way to fix that?
my code: