Skip to main content
Question

Finding matching records between two datasets based on a specifed attribute

  • Sep 11, 2024 9:58 AM UTC
  • 3 replies
  • 737 views

scarter
Contributor
Forum|alt.badge.img+10

Hello Forum,

 

I need to find the records from one dataset where the value in one of its attributes is the same as the value of an attribute in another dataset.

 

For example, If I have two datasets (A and B) I want the output to show which records in A have shared value in B, based on a specified attribute. I want the output to be a selection of A. Something like this…

 

 

I’ve tried Matcher, but that didn’t work for me.

 

Thanks,

Stuart

3 replies

birgit
Influencer
Forum|alt.badge.img+25
  • Influencer
  • Sep 11, 2024 10:10 AM UTC

You can use the FeatureMerger or the FeatureJoiner to do this. For the FeatureMerger your table A can be your requestor and table B can be your supplier. You need to tell FME on which fields to join in the settings of the FeatureMerger. The same is basically true for the FeatureJoiner but it is faster and uses syntax which might be more recognizable if you are used to databases and SQL.


geomancer
Evangelist
Forum|alt.badge.img+71
  • Evangelist
  • Sep 11, 2024 10:25 AM UTC

I wonder why the Matcher didn't work for you…

In Table B change the name of attribute Number to ID, and you can use the Matcher. The features that are present in both tables will exit from SingleMatched.

Using this same idea, you van also use a ChangeDetector. In that case the features that are present in both tables  will exit from Unchanged.

 


scarter
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • Sep 16, 2024 10:45 AM UTC

Ah, of course, FeatureMerger.

I’ve just built the workspace using a FeatureMerger on the real data. It does exactly what I needed. Thanks.