Alteryx Designer Desktop Discussions

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

Input Data: text with delimiter length > 1

elamm43
7 - Meteor

I have a txt file that is delimited with a double pipe ||. I tried to import:

error_dlm.PNG

...but I get an error that "The Delimiter must be a single character."

error.PNG

Has anybody found a solution to this?

 

Thanks,

Elizabeth

4 REPLIES 4
JoshKushner
12 - Quasar
Try reading it in with delimeter '\0' to not split the file. Then use the text to columns to split by '||'
jdunkerley79
ACE Emeritus
ACE Emeritus

I would go with a very similar approach to @JoshKushner

 

2017-11-08_20-54-59.jpg

 

Read it in with no delimiter and not taking first row as headers

Then use a formula tool to replace the double delimiter with a new one e.g.

Replace([Field_1],"||","§")

 

Then use Text to Columns and if first row has header Dynamic Rename

 

 

elamm43
7 - Meteor

Thanks, Josh. That at least reads it in - the text to columns is splitting only by a single pipe, even though I enter || as the delimiter - so every other column is blank. I can do a select, it's just annoying!

JoshKushner
12 - Quasar
@jdunkerley79 is spot on with the replacement. I didn't realize my test case actually split into 3 rows instead of 2.
Labels