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

Match file inputs by specific field

aviziteu
7 - Meteor

Hi,

I've read few other articles on the matter and still could not make it for my case, so please help me with this:

 

i have 2 input files and they match by field:

input 1: LE

input 2: ID

 

I need in the end to fill in the blanks on Country with the Names found in input 2 ( based on the above criteria LE with ID), in my case for LE 4 France to be populated in Input 1.

Thanks!

 

Capture.PNG

8 REPLIES 8
atcodedog05
22 - Nova
22 - Nova

Hi @aviziteu 

 

You can use Join tool 

https://help.alteryx.com/current/designer/join-tool

or 

Find and replace tool

https://help.alteryx.com/current/designer/find-replace-tool

 

Examples workflows attached 

atcodedog05_0-1603995781585.png

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

JosephSerpis
17 - Castor
17 - Castor

Hi @aviziteu I mocked up a workflow that produces the output you describe let me know what you think?

 

Replace_29102020.JPG

aviziteu
7 - Meteor

@JosephSerpis , thank you, it helped me so much to understand the logic behind Join! it is the first time I use it.

 

It works, but I wish to add something, there are also empty fields and it all needs to be displayed in the end, not only the intersection ( including the row in orange which has empty LE but has the attribute case "E"). 

 

Could you advise if Union is needed?

THANKS~ 🙂

 

Capture1.PNG

atcodedog05
22 - Nova
22 - Nova

Hi @aviziteu 

 

Yes adding union tool like this would help that task.

Workflow:

atcodedog05_0-1603997293255.png

 

JosephSerpis
17 - Castor
17 - Castor

Hi @aviziteu you are correct a Union is needed I amended the workflow to show how to deal with this. Let me know what you think?

atcodedog05
22 - Nova
22 - Nova

Hi @aviziteu 

 

Alternatively i would suggest Find&Replace tool since it over comes one-many joins(happens if join columns are not unique in both data source) and always maintains the sort order.

Output:

atcodedog05_0-1603997518724.png

Workflow:

atcodedog05_1-1603997531777.png

For understanding one-to-many join issue look at this workflow

atcodedog05_0-1603997834160.png

 

Find and Replace works only on string field hence need to use extra select tools to convert to string

 

Hope this helps 🙂

aviziteu
7 - Meteor

Thanks a lot, I am so happy with it! @JosephSerpis 

aviziteu
7 - Meteor

Thank you @atcodedog05 , this is an interesting idea, I will certainly test it!

Labels