We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Convert Txt File

natalia_sjuntak
7 - Meteor

Hi All, I have a difficulty to convert file from txt format. 

I have followed all instructions in alteryx but no success. The notification keeps showing "Too many fields".

 

5 REPLIES 5
Elango
5 - Atom

Hi Natalia,

 

Please review the appropriate/previous/next row in the file where the too many fields error is coming. Column values would get moved to different set of columns, ensure to correct it and then use it in Alteryx. It should work.

KGT
13 - Pulsar

@Elango has explained where to look to find the problem. It is always good to understand why something is happening. In this case it's because you have a different number of fields in at least one row.

 

An easy way to work around this issue is to bring the file in with no delimiter and then use "Text to Columns" to blow it out to individual cells. In the input tool, you can select the delimiter, and just put \0 as the delimiter. Make sure to set the field length higher though as well. Sometimes this takes a little bit of playing around to get it right.

 

 

AlteryxGui_ZFMDy8FkxR.png

natalia_sjuntak
7 - Meteor

Hi @KGT 


There is a progress, it shows the data but the data not separated. You can see the pic I attached.

KGT
13 - Pulsar

That's correct @natalia_sjuntak. That method will bring it all in to one column. You can then use the "Text to Columns" tool to parse the data out to multiple columns. 

 

The error you are receiving is because different lines in your CSV have different numbers of fields. Using this method, you'll get the data in and then can make decisions on what you want to do with it. It's a work-around as your file can't be understood without a schema documentation due to the varying number of fields. 

 

I do note that I don't recognise the selection options in your first screenshot and so if this is Alteryx Cloud, the options might be different...

Raj
16 - Nebula

@natalia_sjuntak 
will you be able to add a sample file?

Labels
Top Solution Authors