4

I have two csv files which each have a field containing the same feature type but with different field names. I need to compare the values of these fields in the two files to find out where there are differences? How do I do this in FME.

  • 1
    I figure this might be part of a greater workflow, but why not try it in Excel? Copy your files to the same sheet, write something like =IF(A1=B1,"","WRONG"). Use the data button to filter out all those rows not displaying "Wrong". – Martin Aug 8 '14 at 9:47
  • 1
    funnily enough I just did this....But I thought as FME is the greatest Data tool there is, that there would be a simple way to do it. – Robert Buckley Aug 8 '14 at 10:01
  • Try creating geometry from the csv and using the CRC Calculator fmepedia.safe.com/articles/Samples_and_Demos/… with workspace but you need to modify it with your csv files – Mapperz Aug 8 '14 at 13:42
3

Just use the Change Detector. There's nothing more to it. You can check that the geometry is the same, or just check attributes.

See the description from FME help:

ChangeDetector

Detects changes between two sets of input features.

This transformer is often used with multiple readers, to identify changed features in the two files. It can identify all features that two input files have in common, and those which are in one file and not the other, such as the additions and the deletions.

As usual with FME, they have already implemented something, so doing it yourself with a CRC Calculator, or feature merging is unnecessary.

1

It's possible to change the name field for the comparison. Use the renamer transformer for each field and use the Feature Merger for check the merge between the two csv. Or you can use the Compare tool (new and old files) : changedetector

Julien

  • Hi. What is the compare tool? can´t find a translator with this name. – Robert Buckley Aug 10 '14 at 21:21
  • Changedetector is the Compare tool between old and new features – user3120 Aug 10 '14 at 21:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.