Two Spreadsheet file i need to match the "Name" in two different spreadsheet and Store the Valid "Name" "ID" in new spreadsheet

I have first spreadsheet with duplicate “ID” Column and “Names” Column and i have second spreadsheet which is valid “Names” in Column , i want to check the first spreadsheet row by row “Name” with second spreadsheet which row is match with the second spreadsheet i need to take the Matched “ID” and if same “ID’s” in next rows delete the ID and Names. and save the vaild “Name” ID in New Spreadsheet. if the current row of “Name” Column was not match with the second spreadsheet i need to check if the next row of ID is same check the “Name” Column with second spreadsheet if name match get the ID and delete the Other same ID.

First Spread sheet Image:
image

Second Spreadsheet Image:
image

Thanks in advance.

1 Like

Hi @Seetha_Ravichadran ,

Maybe the result required could be achieved with Join Datatables activity and Group By methods/Remove Duplicate rows activity.

Use the Join Datatables activity with Left Join and First Datatable as Spreadsheet1 Datatable and Second Datatable as Spreadsheet2 datatable, Define the column names to check for Match.

With the Output of Join Datatables activity use Remove Duplicate Rows activity and check if it is the required output or let us know how does it vary from your required Output.

1 Like

@Seetha_Ravichadran

Join will join the tables…but for same name if you have different id’s which id to remove?

Is it always the first one to consider?

Cheers

Hi @Anil_G

image

Blue Marked:

If one ID in “ID” Column that name is matches with Second spreadsheet i need to take only ID

Yellow Marked:

IF two or more Same ID in “ID” Column anyone “Name” is match with the Second spreadsheet i need to take only one ID from the “ID” column.

Red Marked:

If one ID in “ID” column that name is not Matched with the Second spreadsheet I need to store that ID in Log Message.

I need like this as Final Result
image

Hi @Seetha_Ravichadran ,

Could you maybe check with the below workflow :
DT_JoinTables_RemoveDuplicates.zip (10.0 KB)

A correction from my previous suggestion is to keep the Join Type as Inner Join and perform the remove of duplicates based on ID column using Group By clause.

Let us know if the above workflow does not work for your case.

Thank you so much @supermanPunch It’s Worked. :clap:

1 Like

Hi @supermanPunch i need un matched “Name” of “ID” as separate. Could you please help me on this.

image

@Seetha_Ravichadran ,

Could you check with the updated workflow below :
DT_JoinTables_RemoveDuplicates.zip (10.4 KB)

It uses the same implementation and also additional implementation with a Left Join performed on the Data and we only preserve the row values for IDs which do not have any value assigned on the 3rd Column (Other Datatable Name value).

@supermanPunch Thank you.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.