cancel
Showing results for 
Search instead for 
Did you mean: 

To check if matching records have different value in other column

manohar
Contributor

Hi there,

I have 2 excels fiels, source and destination. each one has 3 columns, Id, Quantity, last modified date. I need to find if there’s a matching record by Id but has different values in Quantity, then use record that has different value to update the destination. If the values are matching then I need to ignore.

can any one point me in the right direction?

Thanks
Manohar

4 REPLIES 4

bojanvelevski
Valued Contributor

Hey @manohar,

You can try and use the Diff snap for this purpose.

Regards,
Bojan

Hi @bojanvelevski , I was able to see how diff snap works. in my case there’s a scenario where Quantity is not changed but Last Modified Date is changed. how can I filter the one where Quantity is the modified one?

Also I need to compare 2 other files where the original file has another Id column called External Id. I need to apply similar logic plus need to pull in the External Id from the Original File.

Any directions?

thanks
Manohar

manohar
Contributor

Hi @bojanvelevski , thank you for that. do you have sample pipeline with that snap?

thanks
Manohar

bojanvelevski
Valued Contributor

You can work on some logic here. If you add “last_modified” as a sorting path, along with the “id”, you’ll get the following scenarios:

  1. When id is matched, last_modified is the same, and quantity differs, you’ll get the modified record in “Modified” output.
  2. When id is matched, last_modified differs, and quantity is the same, you’ll get the result from source as a “Deletion” and data from Destination as a “Insertion”

From there you can arrange the flow per your needs.

I hope you’ll find this helpful,
Regards,
Bojan