Alteryx Designer Discussions

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

Line Breaks, extra delimiter and extra text qualifiers in Text File

anuninan07
7 - Meteor

Hi All

 

I am trying to create a solution for removing line breaks, extra delimiter and extra text qualifiers from text input file. But I am not able to figure that out. Can anyone help me resolve this.

 

Here,

Text Qualifier is double quotes 

Delimiter is | (pipe)

 

anuninan07_0-1645163965164.png

 

9 REPLIES 9
Qiu
19 - Altair
19 - Altair

@anuninan07 
Can you provide a text format of input and desired output?

anuninan07
7 - Meteor

Hi Qiu

 

I have added the sample files. 

NikyN
9 - Comet

Hello @anuninan07,

 

please find attached workflow.

 

Let me know if it does work for you!

 

Best Luck!

Niky

anuninan07
7 - Meteor

Hi Niky

 

It works for line breaks but I also need to remove the extra delimiters, extra double quotes and i need a dynamic line break solution. I tried the regex functions but not getting the correct solution.

 

Thanks in advance

Anu

NikyN
9 - Comet

Ah, okay I did not see it in you desired output. So basically, in output file you do not want to see any extra spaces/and punctuations besides | -- right?

 

Updated below -- 

anuninan07
7 - Meteor

I need the output with delimiter as pipe character (|) and text enclosed in double quotes (") and need to remove the extra double quotes in between the fields

For example - "Field1"|"Field2" 

 

And the input file may not be also in this structure so I need to remove all this dynamically

 

NikyN
9 - Comet

Not the most elegant solution but --- hope it helps :)

anuninan07
7 - Meteor

This logic helped me. 

Thank you.

 

Anu

NikyN
9 - Comet

Happy to hear that!

 

@anuninan07 if you accept solution -- please mark as solved!

 

Enjoy your weekend!

 

Best Luck!

NN

Labels