Created on 09-23-2019 09:11 AM - last edited on 09-23-2019 08:27 PM by VidyaSargur
Hi all,
I have 2 xml files that I would like to compare from yesterday and now, then make a new xml file with only the difference between the 2 xml files. This would be on 16k to 20k files daily.
I can see where I can split the file and parse, but nothing specific regarding comparing. These xml files have over 100 individual elements.
Any help / suggestion to get started would be great.
Thank you.
Created 09-23-2019 09:28 AM
Perhaps you are looking for something simple, but comparing XML can be quite a complex topic in general. Therefore I don't expect this to become available in the form of a standard processor.
I would recommend looking into a python script to do this, and then calling this from Nifi.
Created 09-23-2019 10:15 AM
could do write of both files to a ms sql db and compare the 2 rows then generate an xml based on the difference?
please let me know.
Created 09-25-2019 09:59 AM
This is slightly confusing, but if you have a Mysql query to generate the difference, then Nifi can get the data from there and convert to XML if needed.
As generating the difference seems to be the main challenge here, perhaps start by finding a way to do this, and from here it should be trivial to design the Nifi flow around this.
----
If this answers the question, consider marking this as the answer