Read csv files and skip the ones failed on execution

Hi together,

I have a folder with hundreds of csv files. These csvs should all have the same columns and the same format in those columns. Because they come from different stakeholders, there are mistakes in some of them.

Is there a way to process all csv files in the folder with the CSV Reader and to skip the ones which are throwing an error? I tried it with a loop and with the settings available in the CSV Reader but it does not work.

Furthermore, it would be great to save the skipped paths to move the files out of the folder in the end.
And it would be great to define the columns upfront to not be dependent on the first file to be in the right format.

You can try wrapping your csv reader loop in a try catch block or try a differerent data validation before reading the file in combination with Switch or IF block.
br

4 Likes

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