Solved

Can i use a feature merger to merge partial names together?

  • 20 January 2017
  • 9 replies
  • 61 views

For example if one: I want to merge a feature with an attributevalue that is called "East Dartmoor" to a feature with an AttibuteValue called "East Dart". Would it be possible to add a wildcard to the feature merger?

icon

Best answer by david_r 20 January 2017, 14:24

View original

9 replies

Userlevel 4

No, the FeatureMerger can only merge on complete values.

But you can use the InlineQuerier with something like

select * 
from table_a join table_b on table_a.id || '%' like table_b.id || '%'

Badge +22
Sounds like a good candidate to post as an Idea, "FeatureMerger accept wildcards and/or regular expressions"

 

Userlevel 4
Sounds like a good candidate to post as an Idea, "FeatureMerger accept wildcards and/or regular expressions"

 

I agree, this isn't the first time this question comes up.

 

Badge +7

 

Good idea!

 

I added it as an idea:

 

https://knowledge.safe.com/idea/38779/allow-regex-to-perform-matching-in-featuremerger.html

 

Badge +2

Following on from the idea that @jeroenstiers logged - the FeatureMerger requester and supplier key do give you access to the Text Editor where you have access to both regex and string functions.

I've also attached a simple workspace (2017) as an example featuremergerregex.fmw

However, I think in this case what @jarodbenton89 is probably looking for is a fuzzy joiner. This is something we plan to add to FME. It would be based on the fuzzy matching used in the FuzzyStringComparer transformer, but allow you to merge two dataset as per the FeatureMerger. This question would also be a good candidate for a fuzzy join.

Badge

Following on from the idea that @jeroenstiers logged - the FeatureMerger requester and supplier key do give you access to the Text Editor where you have access to both regex and string functions.

I've also attached a simple workspace (2017) as an example featuremergerregex.fmw

However, I think in this case what @jarodbenton89 is probably looking for is a fuzzy joiner. This is something we plan to add to FME. It would be based on the fuzzy matching used in the FuzzyStringComparer transformer, but allow you to merge two dataset as per the FeatureMerger. This question would also be a good candidate for a fuzzy join.

Update: I used this RegEx expression to trim the end of a string starting from the last instance of a back-slash (in this example): @ReplaceRegEx(@Value(Field),\\\\(?:.(?!\\\\))+$,"")

 

---

 

I can't open this in 2016 - what exactly are you doing with the RegEx/String Functions to allow the "fuzzy" comparision to occur... I just need a "starts with"

 

 

Badge +2
Update: I used this RegEx expression to trim the end of a string starting from the last instance of a back-slash (in this example): @ReplaceRegEx(@Value(Field),\\\\(?:.(?!\\\\))+$,"")

 

---

 

I can't open this in 2016 - what exactly are you doing with the RegEx/String Functions to allow the "fuzzy" comparision to occur... I just need a "starts with"

 

 

Hi @peterx,

 

This workspace was made using FME 2017 so may not work in an older version: https://knowledge.safe.com/articles/819/fme-versions-and-workspace-compatibility.html.

 

If the best answer to this question isn't what you are looking for it might be better to post a new question and provide more details so that the community can better help you with your case.

 

Badge +2

Following on from the idea that @jeroenstiers logged - the FeatureMerger requester and supplier key do give you access to the Text Editor where you have access to both regex and string functions.

I've also attached a simple workspace (2017) as an example featuremergerregex.fmw

However, I think in this case what @jarodbenton89 is probably looking for is a fuzzy joiner. This is something we plan to add to FME. It would be based on the fuzzy matching used in the FuzzyStringComparer transformer, but allow you to merge two dataset as per the FeatureMerger. This question would also be a good candidate for a fuzzy join.

@peterx The example wasn't a fuzzy join. Just a straight regex:

 

@ReplaceRegEx(@Value(requestor_key),(^East Dart).$,\\1)

 

Looks like someone still needs to post an Idea for a Fuzzy Joiner transformers for the community to vote on.

 

Badge

I had similar problem, but I managed to do workaround. I had attributes like "Filename" and the other "1234_Filename". I used StringSearcher to extract numbers and underscrore to new attribute

Then I replaced that with empty space to original attribute with StringReplacer

After that I could use FeatureMerger.

FeatureMerger could have 'Contains' as 'Comparison Mode'

Reply