.txt file with inconsistent delimiters??
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
Solved! Go to Solution.
- Labels:
- Input
- Preparation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Cheers
Adam
https://www.linkedin.com/in/adriley/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks both for your replies
Debra:)
