Question

How to use the matcher?

  • 7 August 2014
  • 4 replies
  • 28 views

Badge
I have simply two Fields which contain IDs in 2 separate Readers. I simply want to know which ones are the same. According to the documentation this is a job for the matcher, but it is not giving me the expected results. The matcher seems to compare the complete file and not just the attributes which I define.

 

 

"Detects features that are matches of each other. Features are declared to match when they have matching geometry, matching attribute values, or both."

 

 

The field in File 1 = MedID and the field in File 2 = MediaID. If both fields have the same attribute, I want it to be included in "matched" output port. The matcher does not match anything though and the inspector looks like this:

 

What am I doing wrong?

 

 

 

 


4 replies

Badge
Ahhh....the problem is that I am comparing attributes from fields which have different names!  What do I do when the field names are different?
Userlevel 2
Badge +17
I think the FeatureMerger would be easier to solve the subject in this case.

 

Send File 1 features to the Requestor port, send File 2 feature to the Supplier port.

 

Set "Join On" parameter to medID for Requestor, mediaID for Supplier.

 

Matched File 1 features will be output from the Merged port; matched File 2 features will be output from the Referenced port or the DuplicateSupplier port.
Badge
Yes, the FeatureMerger is the right transformer for this.

 

 

It essential copies the attributes from the one file to the other file where both ID fields have the same value. If you connect file1 to the Requestor, then it copies the attributes from file2 where they have identical ID and the result will be at the Merged output with attributes from file1 + attributes from file2.
Badge +3
Or build a list grouped by medID and MediaID.

 

 

CountElements or use Histogrammer.

Reply