kotlin-csv icon indicating copy to clipboard operation
kotlin-csv copied to clipboard

Allow an error interface channnel

Open blackmo18 opened this issue 2 years ago • 1 comments

they were use case that we want to process whatever processable row and keep other at bay so only those error rows will be retried after.

Currently kotlin-csv only allow to skips error row.

You have to filter through the whole csv again just to validate what failed.

If there is an error channel, like an injectable lamda functions or whatever mechansm. We can keep the errors seperately

blackmo18 avatar Aug 05 '23 23:08 blackmo18

Thank you for your input.

As you mentioned, there are only a few simple options for dealing with errors currently available. https://github.com/doyaaaaaken/kotlin-csv#customize

However, even with the current specification, it is possible to deal with complex errors itself. You can do this by using the following function. https://github.com/doyaaaaaken/kotlin-csv#read-as-sequence

Since we want kotlin-csv to be a simple specification, we will carefully consider the option to handle complex errors only if we get a lot of requests for it from our users.

doyaaaaaken avatar Aug 07 '23 08:08 doyaaaaaken