Alteryx Designer

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

.txt file with inconsistent delimiters??

Highlighted
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
 

ACE Emeritus
ACE Emeritus

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!

 

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

Highlighted
Alteryx
Alteryx
From your screenshot it looks like your file is tab delimited.  Have you tried as the delimiter?

Cheers
Adam
Adam Riley
Principal Software Engineer
Tech Lead Core Engines, Alteryx
Highlighted
5 - Atom
As simple as that...Thanks Adam that worked.

Thanks both for your replies

Debra:)
Labels