Import-DbaCsv ignored data
Is there a way to view or log bad rows of data that are encountered during a data import while using -ParseErrorAction AdvanceToNextLine option?
@GrumpyVader , after looking into this issue it seems these changes are needed:
- The Import-DbaCsv command would need to add the 'RaiseEvent' as a valid ParseErrorAction. The ParseError event can then be registered and the events themselves can then be returned with the final custom object.
- The CsvReader library needs a fix so that the RaiseEvent doesn't stop processing the csv file when an error is encountered. That issue is logged here: https://github.com/phatcher/CsvReader/issues/77
CsvReader as a project appears to be going dormant, so another option is for Import-DbaCsv to use a different csv parser.
I'm just adding my voice to the chorus of this request. Thanks for already pursuing the feature implementation and fix in the relevant projects!
https://www.nuget.org/packages/CsvHelper/ looks good
Any updates on this issue? Namely this part:
The CsvReader library needs a fix so that the RaiseEvent doesn't stop processing the csv file when an error is encountered. That issue is logged here: https://github.com/phatcher/CsvReader/issues/77