Hi,
I am using the Dynamic Input tool to read multiple CSV files into my workflow; however, there are some files that create an error due to "a field was missing a closing quote in record...". Once that error occurs, it stops reading any further CSV files.
I'm wondering, is it possible to change the settings so that it ignores that error and continues to read the remaining lines of the CSV file, along with any other CSV files that come after it?
Thanks in advance!!
Solved! Go to Solution.
Hi @lmosher
I think that would be the case you should use a Batch Macro to read these files.
In the Batch Macro you can actually give a special treatment to each of these cases of corrupted schema - you could even set something to skip these files.
There are some articles that explain this method
Cheers,
Hi @Thableaus,
Thanks for your prompt response!
Here's what I've got so far per your suggestion. I've never used the Batch Macros before, so I'm not entirely sure how to progress from here.
One of the links you posted talked about changing the names of the input; my issue deals with a single line in the CSV file that doesn't have a closing quotation. How do you go about setting the macro to skip the lines in the file with the corrupted schema?
In this case you don't use the Dynamic Input.
The macro needs to be built separately from where you're going to insert the File Paths (from the Directory Tool).
I will get you an example later, but if you carefully read the articles I posted, you will figure this out.
Cheers,
Using the "Text to Columns" tool is a lot more flexible than the "Input" tool, and then you can filter out the bad data and try to fix it.
In the "Input" tool you set the delimiter to "\0" for no delimiter, and in the "Text to Columns" tool you put in your real delimiter.
The "Input" tools configuration window:
The "Text to Columns" tools configuration window:
@darryl5280 this works perfectly! Thanks for the solution!!
On the options where it says " Ignore delimiters in", I changed this from "Quotes" to "None", and that seemed to fix this error as well.
User | Count |
---|---|
19 | |
15 | |
15 | |
9 | |
8 |