I have two files a csv file and an Excel file with 4 worksheets, I need to compare the two files to see if all records in the Excel file with all sheets are present in the csv file, there is a particular column in the Excel file, it is a string e.g. 'ff_abcd_12345', I need to get everything apart from the numbers from this and compare it to a field in the other file. There are thousands of records which need to be compared, all I need to do is check if the record exists and report it as matched or unmatched. Any ideas on how I deal with this will be much appreciated.
Solved
comparison of data
Best answer by takashi
Hi @saqibamin, If you need to reform the Book2 table structure into the same as the Book1, this workflow is a possible way.
JSON Template Expression (Basic):
[
{"Item" : "FDER", "sum" : fme:get-attribute("FDER")},
{"Item" : "HTYU", "sum" : fme:get-attribute("HTYU")},
{"Item" : "GHJK", "sum" : fme:get-attribute("GHJK")},
{"Item" : "JILN", "sum" : fme:get-attribute("JILN")},
{"Item" : "KILJ", "sum" : fme:get-attribute("KILJ")}
]
JSON Template Expression (Advanced): The Tester is not necessary in the workflow above if you use this expression.
[
for $item in ("FDER", "HTYU", "GHJK", "JILN", "KILJ")
let $sum := xs:double(fme:get-attribute($item))
where $sum != 0
return {"Item" : $item, "sum" : $sum}
]
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.