Skip to main content
Solved

Matching an ID to another data set


So,

 

 

I have one data set that has some attributes that match another data set, I simply want to find out what records in data set 1 have a matching record in data set 2. 

 

 

So I have used the "matcher" transformer and a bunch of matched results get spit out of the "Matched" port but only about 60 of them are from data set 1 and when i look at the data and manually search for a match in data set 2 there is not always a match. 

 

 

This seems to happen in "NotMatched" also. The matcher is clearly doing something i dont understand.

 

 

What is that matcher doing to end up with this result?

 

Is there a way to just have FME report back that X record from data set 1 has a match in data set 2? 

Best answer by brettlordcastil

Place an AttributeExposer before your Matcher and expose fme_feature_type. Then on your Matcher, put fme_feature_type under "Attributes That Must Differ". This will prevent features from data set 1 matching each other.

 

Lastly, since you only want features in data set 1 at the end, route the output of Matched and SingleMatched to a single Tester transformer and test the value of fme_feature_type is only the name of data set 1; this will filter out all of the features from data set 2 that were matched.

 

 

Edit: You can also use potentially use fme_basename or fme_dataset may work as well depending on circumstances, but fme_feature_type will probably be more dependable since it will separate out different data layers from the same source file.
View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

takashi
Influencer
  • April 6, 2014
Hi,

 

 

The Matcher compares all the input features. If a dataset 1 feature matched with another dataset 1 feature, they go to Matched port even though there is no matched dataset 2 feature.

 

The Matcher has many parameters. How did you set them?

 

 

Takashi

Forum|alt.badge.img
  • April 7, 2014
Hi,

 

 

You could try the FeatureMerger instead.  I would also have a good look at the data you are trying to compare.  Are they the same case?  (fix: StringCaseChanger).  Are there extra spaces? (fix:StringReplacer).  Just some things to try. 

 

 

Good luck.

Place an AttributeExposer before your Matcher and expose fme_feature_type. Then on your Matcher, put fme_feature_type under "Attributes That Must Differ". This will prevent features from data set 1 matching each other.

 

Lastly, since you only want features in data set 1 at the end, route the output of Matched and SingleMatched to a single Tester transformer and test the value of fme_feature_type is only the name of data set 1; this will filter out all of the features from data set 2 that were matched.

 

 

Edit: You can also use potentially use fme_basename or fme_dataset may work as well depending on circumstances, but fme_feature_type will probably be more dependable since it will separate out different data layers from the same source file.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings