Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

What would be the best method of mapping a attribute from one CSV to another CSV?

Hoss2434
7 - Meteor

I am trying to pull a attribute from one csv to another based on a primary key column. Here is an example of a before and after of what I am trying to do:

 

Before:

 

CSV 1

Primary ValueValue
1red
2blue
3green

 

CSV 2

Primary ValueValue
1 
3 
3 
2 
2 
3 

 

 

 

After:

 

CSV 1

Primary ValueValue
1red
2blue
3green

 

CSV 2

Primary ValueValue
1red
3green
3green
2blue
2blue
3green

 

Essentialy I am just trying to fill the "Value" column in CSV 2 with the attributes mapped out in CSV 1. In my actual data-set I have hundreds of values in my mapping, so I don't want to create indivudual formuals for each mapping. 

I was wondering if anyone else knew another way?

 

Any help would be appreciated.

Thanks!

 

2 REPLIES 2
BS_THE_ANALYST
15 - Aurora
15 - Aurora

@Hoss2434 I would suggest using the Join tool:

BS_THE_ANALYST_0-1676422437012.png

 

Input examples:
CSV1

BS_THE_ANALYST_1-1676422478733.png

CSV2:

BS_THE_ANALYST_2-1676422500515.png

Output (once you deselect appropriate fields):

BS_THE_ANALYST_3-1676422549301.png

 



 

All the best,
BS

LinkedIN

Bulien
binuacs
21 - Polaris

@Hoss2434 Another way of doing this with the find and replace method

binuacs_0-1676445866954.png

 

Labels
Top Solution Authors