Forum Discussion

manohar's avatar
manohar
Contributor
5 years ago

To check if matching records have different value in other column

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

  • bojanvelevski's avatar
    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

    • manohar's avatar
      manohar
      Contributor

      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