Compare column values in 2 different data tables, with condition few values have multiple matching criteria

Hi All,

I have below 2 different data tables with 1 column each, both will have same row count, i need to check if all products in these 2 are matching or not-
DT 1 -
Product Names
Water Bottle
Laptop
Mobile
Pen

DT2 -
Product Names
Pen
Water Bottle
CellPhone
Laptop

Earlier i used to work with normal nasted for each loops to compare each product in above 2 DTs and above example would return all products NOT match.
but now, there are few products which name has been modified and should consider that while matching products. For Example - Mobile will now be refer as Cellphone. So comparison above 2 DTs should return all products matching.

I have a list of all modified product names as DT3 like below -
DT3 -
List of modified product names
Mobile
Cellphone
watch
Wristwatch

I need a help with logic, as how we can handled these modified product names while comparing DT1 and DT2.

we would use instead:

  • Join DataTable
  • LINQ

when mobile and cellphone has to be treated as the same product name, then we cannot use the default above mentioned options without any additional enrichments. Depending on your more to define requirements we can check for additions and options

@Veeha

Hi
Is there any fixed datatable where there will be modifed product names.
Like every time we can find modified names in the Datatable2

Yes, agreed to first point.
but did not get your second point. could you please elaborate more

Yes, so DT3 (modified product names) i will be storing in an asset. so even if later business team wants to add any modified product name we can just update that asset.

@Veeha
we would recommend to checkl for alternates when it is about providing similarties lists e.g.

  • JSON in combination with Storage Bucket
  • Data Service

which one is the second point for you:

  • LINQ? - lets first get cleared on how the definitions of similarities are foreseen

you started with the mentioning of:

herfore we recommend checking estimated volume and complexitiy

Yes, business may add or remove any products from DT3 (modified product name list). Thats the reason o was thinking to keep that list in a Asset

Could you please elaborate this? and how we can leverage any of these for checking modified product names while comparing product