Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
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
20 - Arcturus
20 - Arcturus

@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