This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
on 09-27-201611:24 AM - edited on 03-11-201909:28 AM by SydneyF
I am reading a large(ish) .txt file, with fields separated by semicolons.
Out of more than 2 million records, on about 800 I get the error: "not enough fields in record" from the Input Data Tool.
This error is very similar to the error mentioned in this article. Generally it refers to an issue where a particular row of data has less delimiters than previous rows. There are a couple of ways to resolve this and fix the row that is causing the issue. Both solutions from the original forum post will help to make it so you can read the file into Alteryx. Personally, I prefer the option where you read in the data file without a delimiter (either specify None or use \0). This forces all the data into a single field which you can then easily parse out using the Text to Columns tool as noted in the first article linked above.
Attached is a sample that shows the parsing method to resolve the issue.
The other way to go about it is to use the process below:
In the Input Tool configuration, there is a "Treat Read Errors as Warnings".
If you check this it will typically allow all the records to be imported and then you can determine where the issue is (it should give you warnings on the records with an issue).