Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Trouble with .txt input delimited with a |

lascurainge
7 - Meteor

Hi y´all:

 

I'm having trouble with a input tool for a .txt file from SAP.

 

The delimiter for the file is "|", not a comma. I´m not able to input it as a CSV file delimited with a |. So I decided to just input it as a .csv with no delimitation and after that treat the data with different tools (text to columns) to get the data format I need.

 

When I try to input the data, it says the following error is occurring  "Too many fields in record #20698"

 

The file I'm trying to upload has way more fields that 20698. More like 1.5 mil.

 

I don´t if you guys can help me with this. I´m really struggling here since i have to input like 150 + files.

 

I´m not able to upload the file since it´s confidential, but if it's necessary I can create a example so you guys can try to input it.

 

Thanks very much.

6 REPLIES 6
wdavis
Alteryx
Alteryx

Hi @lascurainge 

 

In the configuration of the Input Tool, the 7th option is 'Field Length', can you try increasing this and seeing if that solves your problem?

 

If that doesn't work and you are able to post a sample of the data, I am happy to take a further look!

 

Kind Regards

Will

lascurainge
7 - Meteor

Hi @wdavis,

 

I just solved the problem by setting the input as a .flat file. After the input with a text to columns tool i get the data format I need.

 

Thanks very much

 

 

DavidP
17 - Castor
17 - Castor

My guess is that what's happening is something like this:

 

Input file looks like this. All rows have 5 columns, but row 3 has 6.

 

col1|col2|col3|col4|col5
1|1|1|1|1
2|2|2|2|2
3|3|3|3|3|3
4|4|4|4|4

 

Then this happens with the input data tool when I set the delimiter to a |

 

DavidP_0-1595324485315.png

 

If I load it as a CSV with \0 as delimiter and 1st row contains field names unchecked, it looks like this:

 

DavidP_3-1595324783434.png

 

Now with a Text to columns tool, I can parse [Field 1] - note, row 3 will have 2 values in the last column. If you want, you can use Dynamic Rename to take 1st row of data as field names.

 

DavidP_4-1595324897804.png

 

 

 

NeilFisk
9 - Comet

If you're file is delimited by pipes (i.e., |), you can substitute the comma that is in the Delimiters field with the pipe (|) and it will work without having to do any additional changes.  If your data has the Field Names in the first row, then leave the First Row Contains Field Names checked.

PARESH
7 - Meteor

 Hi,

I am also trying this, just wanted to check with you what did you mentioned in Delimiters field (In my case its tab)

Thanks in advance !

DavidP
17 - Castor
17 - Castor

Hi @PARESH 

 

If you want to use tab as the delimiter in text to columns, type \t

Labels