Free Trial

Alteryx Designer Desktop Discussions

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

How to compare a csv file and excel file to identify duplicates?

Sunithaprdp
8 - Asteroid

I am new to Alteryx. I wanted compare a csv file with 136 characters with an excel worksheet to identify lines with common identifier. The output should be similar to the csv input file. But it should contain only the details of common identifiers. Please help. I am attaching samples.

As per the sample : there is a common identifier between csv SAMPLE and excel sample that is '00012-0123-45 with name ABCDE. So the output should be the eliminated csv file with no second line that is:

QTY0001205789622021STUVW00000001.23400000000000123.0000000000009999.99000000020000000002379.670000000000000.000000000002345.78.

The text file should only contain first line of SAMPLEs.

67 REPLIES 67
Sunithaprdp
8 - Asteroid

I would like to learn how you came up with this workflow. It would help me a lot. Could you please detail it. Like how you used required tools and how you came up with those formulas?

binuacs
21 - Polaris

@Sunithaprdp  added a sort tool and fixed the heading issue

 

binuacs_0-1642077687238.png

 

Sunithaprdp
8 - Asteroid

I tried this. However the result is the same:

Field_1 : it is there in the first line of text file and quarters we are receiving like as such :

22021

32021

32021

22021

 

It would have been better if we get the result without Field_1 in the beginning and quarters in the lines as 

22021

22021

32021

32021 likewise

binuacs
21 - Polaris

@Sunithaprdp the header "Field1" will not appear in the output csv file. I also updated the workflow for ordering the output file. Please try now

 

binuacs_0-1642081876496.png

 

binuacs
21 - Polaris

@Sunithaprdp the Find and Replace tool work like lookup table (similar to excel lookup), the find and replace tool take the  NDC-11 and search in the Field_1 field from the text input file and append the result (I selected the append option). If there is a mach found it will append the NDC-11 field at the end of the result , if there is no match then it will return NULL value

binuacs_0-1642082129074.png

 

The formula tool is to remove the character "-" from the NDC-11 filed so that it can match with the text NDC-11 value, which doesnt have any "-" in it.

 

Once you familiar with the Alteryx you will able to easily identify which tool is useful in each use cases

.

please let me know you need any additional information

Sunithaprdp
8 - Asteroid

I am receiving desired output however the Field_1 is there as an header to the output text file.

binuacs
21 - Polaris

@Sunithaprdp Please make sure the First Row Contains Field Names is unchecked . 

 

binuacs_0-1642416716013.png

 

Sunithaprdp
8 - Asteroid

Could you also help me understand what does actually Field_1 represents?

Sunithaprdp
8 - Asteroid

Sure I will try and then message the result.

binuacs
21 - Polaris

@Sunithaprdp Since your text file doesn't have any heading Alteryx assigned a default heading to process the records. 

 

Labels
Top Solution Authors