ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

.txt file with inconsistent delimiters??

debra_howard
アトム

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件の返信4
tom_montpool
クエーサー

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
アトム
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
アトム
As simple as that...Thanks Adam that worked.

Thanks both for your replies

Debra:)
ラベル
トップのソリューション投稿者