Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

How to find multiple combinations from two source?

Prakash515
5 - Atom

HI,  

 

What is the easiest workflow to do exact match and contains keyword? (Multiple combination)

 

I have a data table :

 

ProcessURL
ahttps://SiteAssets/Prof%20Team.csv
ahttps://SiteAssets/Prof%20Capture.CSV
bhttps://SiteAssets/Prof%20Training.aspx
bhttps://SiteAssets/Prof%20Team.csv
chttps://SiteAssets/Prof%20Capture.CSV
dhttps://SiteAssets/Prof%20.aspx
ehttps://SiteAssets/Prof%20Capture.CSV

 

a lookup table :

L_ProcessKeyword
aTeam
acapture
aTraining
bAspx
btraining
cteam
dprof%
e%20

 

 

And I require the following output based on the below Condition:

    Find the exact Match in the Lookup table(Process = L_Process)

    If the process matched then compare the matched L_Process keywords with URL( URL = contains(keyword))

    Else Null()

 

ProcessURLKeyword
ahttps://SiteAssets/Prof%20Team.csvTeam
ahttps://SiteAssets/Prof%20Capture.CSVcapture
bhttps://SiteAssets/Prof%20Training.aspxAspx
bhttps://SiteAssets/Prof%20Training.aspxtraining
bhttps://SiteAssets/Prof%20Team.csvNull
chttps://SiteAssets/Prof%20Capture.CSVNull
dhttps://SiteAssets/Prof%20.aspxprof%
ehttps://SiteAssets/Prof%20Capture.CSV%20

 

Can anyone advise, please?  

 

Many thanks!

5 REPLIES 5
BrandonB
Alteryx
Alteryx
The find and replace tool can do exactly that! https://help.alteryx.com/current/designer/find-replace-tool

You will want to connect both data sources and configure it to the append option where you check the column for the field that you want to append, in this case the keyword.
BrandonB
Alteryx
Alteryx
You can also check the box to append the process field and then run it through a filter after the find and replace where process = R Process it however it is named.
Prakash515
5 - Atom

Thanks for the reply. I couldn't find the solution yet.

 

Do you have a sample use case for the code? 

BrandonB
Alteryx
Alteryx

I took a slightly different approach that what I outlined, but this should get you to where you need to be. The first step is to take both data sets and use a join tool where we link them up based on the process columns. Then I used a formula tool that creates a new column. It says if the URL contains the keyword, set the value of this column to 1, otherwise set the value to null. Let me know what you think and please see attached workflow. 

 

Matching.png

Prakash515
5 - Atom

Thanks a lot, @BrandonB.

Learnt from your example

Labels
Top Solution Authors