Alteryx Designer Desktop Discussions

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

Finding different length values into 2 data sources

uak
5 - Atom

Hello Experts,
I have 2 documents containing data of different length which i wanted to match/compare in order to find out the matching key value:

Goal
1. Mainly i wanted to look my Doc 1 Column into the Doc2 and wanted to find the Mode & SW values.
2. How many of them match and also the non-matching one(s)
Doc 1 (csv file) : Contains one column . The key field has around 11 or more character length
like as below

Key
M31AA210000
M31AA210011
M31AA210999
M32BB112222


Doc 2 (csv file): Contains more than 1 column. But the Key field have different length

this is how Doc 2 look like

KeyDateModeSW
KEERMM31AA21000019.05.2020Open20.01
KRRRMM31AA21001119.05.2020Close20.02
KPPRMM31AA21099919.05.2020re-open20.03
KPPRMM32BB11222219.05.2020Adjusted20.03
KPPRMM32BB112222RR19.05.2020re-open20.03

 

 

I have used the Filter Tool but to put a lot of values one-by-one into filter tool doesn't look to be an appropriate way.
Can you suggest me any smarter idea. May any tool can compare Key of different length ?


Thanks
Regards

2 REPLIES 2
ggruccio
ACE Emeritus
ACE Emeritus

Hi @uak,

 

Since the Key in file 1 can be 11 or more character length it won't be as simple as just matching on the Right 11 characters from the Key in file 2. 

 

Just use the Append Fields tool to create a matrix with every possible combination of matches and then use some formula and filter logic that looks for the Key in File 2 to contain the Key in File 1.  Sample workflow attached.

 

ggruccio_1-1589911961555.png

 

ggruccio_0-1589911864642.png

 

uak
5 - Atom

Thanks  

What i have noticed is that Append Tool is handling only 18 records .
Although i have 4000 records in file1 which i wanted to look in file2 which has 10000 records.
"Error: Append Fields (40): There were more than 16 records in the source." This is a sign that for such a large data Append is not the best option to use?
 
 
I am now using Simple formula tool
Labels