Alteryx Designer Desktop Discussions

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

Could someone let me know to how get rid of unknown characters from the text file.

vgeetanp
7 - Meteor

For Example :

 

I have a text in my text file (below)  wherein while importing it into the workflow I need to view it by ignoring the unknown character. Refer Below.

 

vgeetanp_0-1596551564686.png 

          To 

 

vgeetanp_1-1596551693973.png

 

Is it easy to do ? Thanks.

18 REPLIES 18
joshbennett
11 - Bolide
11 - Bolide

Just use a Formula tool and a Replace or REGEX_Replace expression and copy / paste that symbol as the 'pattern' parameter and replace with empty quotes.

 

For example:

replace([Field_1], "paste the character to be removed here", "")

 

That should work, but let me know if you run into any issues. 

vgeetanp
7 - Meteor

Thank you Dexter.. But I get the below error while using the replace formula.

vgeetanp_0-1596553236175.png

 

I used the below formula 

vgeetanp_1-1596553279446.png

But in the formula Configuration field it shows like the below

vgeetanp_2-1596553328198.png

 

Could you help to fix it ?

joshbennett
11 - Bolide
11 - Bolide

Maybe try this instead:

 

REGEX_Replace([Field_1],"[^_-\w\(\);,\.'&\s\+\*\?\^\$\\\/\|\[\]\{\}\[\]]", '')

 

 

vgeetanp
7 - Meteor

I Think the issue is with the input tool itself.

 

vgeetanp_0-1596554931818.png

 

Do we have any way to import the report that has the below character in it?

vgeetanp_2-1596555026359.png

 

Please assist.

 

joshbennett
11 - Bolide
11 - Bolide

Have you checked "Treat Read Errors as Warnings" in your Input Tool configuration?

 

DextersLaboratory_0-1596555275282.png

 

vgeetanp
7 - Meteor

Thanks Dexter.. Now the Import function works. But the the formula does not work.

vgeetanp_0-1596558457176.png

 

Do you have any other option ?

joshbennett
11 - Bolide
11 - Bolide

Can you upload a small .txt file with some of those characters included within? If so, I can take a closer look to figure out what would work.

vgeetanp
7 - Meteor

Hello Dexter, I have attached the Input file and the required output format.

 

Could you please help me to figure out a way to get the output in the required format ?

If you  can share the Workflow it would be great. Thank you. 

KrishnaKuchibhotla
6 - Meteoroid

Hi ,

 

I am not sure that using Data cleansing tool will solve the problem for all the rest of the scenarios that you are experiencing, but the unknown character in the text file that you shared has been solved by using Data Cleansing tool and checking the Tabs,Line Breaks and Duplicate whitespaces.

 

KrishnaKuchibhotla_0-1596606693297.png

 

Hope this helps. Stay Safe

 

Thanks

Krishna

 

Labels