Free Trial

Alteryx Designer Desktop Discussions

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

How to do a pattern search in a column with a set of key words

Dilver_Shaik
7 - Meteor

Hi Team,

 

I have a requirement where I have a file with apprx 40K+ keywords. Now I need to compare these key words with one of my data column in a table to do a pattern matching kind of thing and flag as yes if matched. Let me illustrate with an example below:

 

keywords :

china

cn

india

in

ind

calpe

wil

tocina

.... (This list goes upto 40K+)

 

 

My Customer_Data Table:

Bank of India

indusland bank

Bank of baroda

Tocinas commercial bank

Bank of good will

State Bank of India

Bank of America

.... (This list goes upto 10K+)

 

Expected Output:

Customer_Data                Matches?

Bank of India                       Y             (This has india keyword)

indusland bank                    Y             (This has ind keyword)

Bank of baroda                    N             (This doesn't match any keyword)

Tocinas commercial bank    Y            (This has tocina keyword)

Bank of good will                  Y            (This has wil keyword)

State Bank of India               Y            (This has india keyword)

Bank of America                   N            (This doesn't match any keyword)

 

 

Hope the above illustration helps. I cant upload the data due to restrictions in my org. Please bear with that.

Any help is much appreciated

 

Thanks & Regards

Dilver

2 REPLIES 2
DataNath
17 - Castor
17 - Castor

Hey @Dilver_Shaik, the Find Replace tool is perfect for this situation. You first just need your customer data and keywords in two tables:

 

DataNath_0-1686666039182.png

DataNath_1-1686666052794.png

 

Then you'd set the tool up like this. Given your example, you'll want to use a case insensitive search anywhere in the field:

 

DataNath_2-1686666087334.png

 

Then finally, we can handle the flagging and processing of the keyword label field like so with a couple of Formula expressions:

 

DataNath_3-1686666156419.png

 

Workflow attached. Hope this helps you out!

Dilver_Shaik
7 - Meteor

Thanks @DataNath  - It suits my requirement

Labels
Top Solution Authors