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 Discussions

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

.txt file with inconsistent delimiters??

debra_howard
5 - Atom

Hi

Does anybody know how to deal with a file like this?

Tableau seems to open it fine but I can't work out how to open this in Alteryx.

  • Delimiters are inconsistent as " " appears on cell items but not on the values
  • I can't use a fixed width as alignment isn't consistent

Thanks in advance for any suggestions

Debra
 

4 REPLIES 4
tom_montpool
12 - Quasar

Hi,
You could try inputting using CSV and then changing the delimiter from a comma to \0. This will read each row of your txt file into a single column (so you might also want to make the field length really long).
Once you have the file in Alteryx, you can use a variety of functions to figure out how to "fix" the input file.
A few that have proven useful to me:
REGEX_CountMatches -- to count the number of expected delimiters to see if each row has the same number
REGEX_Replace/REPLACE/REPLACECHAR -- to fix identified cases of 'bad' delimiters
Once you've made your fixes, you can either use the Text To Columns parsing tool to split your fields apart or you can save the single modified field to CSV, once again setting the delimiter to \0. Then input it with a standard input tool.
Good Luck!

 

debra_howard
5 - Atom
Thanks Tom, i'll give this a go :)

AdamR_AYX
Alteryx Alumni (Retired)
From your screenshot it looks like your file is tab delimited.  Have you tried as the delimiter?

Cheers
Adam
Adam Riley
https://www.linkedin.com/in/adriley/
debra_howard
5 - Atom
As simple as that...Thanks Adam that worked.

Thanks both for your replies

Debra:)
Labels