Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Knowledge Base

Definitive answers from Designer Desktop experts.

Too many fields in row x when reading in a .csv file

AndrewL
Alteryx
Alteryx
Created

These methods should work in most versions of Alteryx. 

 

One of the most common issues we see from clients trying to read in a .csv file is that they are receiving an error starting “Too many fields in row x”, and because of this Alteryx can’t read in the file.

 

TooManyFields_Error.jpg

 

There are a couple of different ways you can resolve this error.

 

First, in the Input Data tool, you can tell Alteryx to treat read errors as warnings to allow the file to be read in.

 

ReadError_AsWarningCheckBox.jpg

 

This will change the Error to a Warning so that Alteryx can read in the file so you can investigate.

 

Error_AsWarning.jpg

 

The other method is to read the file in with no delimiter. You can do this by changing the delimiter in the Input Data tool to \0.

 

No Delimiter.jpg

 

Once you have your data parsed back out into its fields, you can use the Dynamic Rename tool to correct your field names, a select tool to remove the original field, and a simple Trim() function to remove the extra delimiter from your data.

 Workflow_Screenshot.jpg

This process is illustrated in the attached workflow, created in version 10.1.

 

 

Attachments
Comments
aeulusan
7 - Meteor

Thanks for sharing this. However I think the issue many of us are facing is that we have that unncessery comma not in the last field but let's say in the 2nd column. Thus it separates the columns incorrectly and your solution would only work for a case where the comma is only at the last column

blitz45
8 - Asteroid

@AndrewL how would you fix the issue if we are using the Directory tool instead of the Input Data tool?