Skip to main content
Question

Merge features by attribute that contains string from target attribute

  • January 27, 2017
  • 4 replies
  • 287 views

edgarrunnman
Forum|alt.badge.img

I want to merge features by attribute that contains string from target attribute.

FeatureMerger does job done but only in case where attribute(req) = attribute(sup). In my case i want to expression to loke like this attribute(req) CONTAINS attribute(sup).

4 replies

david_r
Celebrity
  • January 27, 2017

Have a look at this similar post:

https://knowledge.safe.com/questions/38771/can-i-use-a-feature-merger-to-merge-partial-names.html

Basically just expand the wildcard to something like

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

Just be aware that matching on substrings is relatively slow.


edgarrunnman
Forum|alt.badge.img
david_r wrote:

Have a look at this similar post:

https://knowledge.safe.com/questions/38771/can-i-use-a-feature-merger-to-merge-partial-names.html

Basically just expand the wildcard to something like

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

Just be aware that matching on substrings is relatively slow.

Impressive replay time :) InlineQuerier did the job!!!

 

Thank You

 

 


Forum|alt.badge.img+7

Another question that might be solved by implementing string functions and regex!

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


jaywood
Participant
Forum|alt.badge.img+1
  • Participant
  • June 20, 2019

I had similar requirement. Solved using Inlinequerier

Sample below joins table SAP To LOC, where SAP.MatchedPlatform is a sub string in LOC.LOC_OTH_NAME_MATCH

creates

SELECT * FROM SAP LEFT JOIN LOC ON INSTR(LOC.LOC_OTH_NAME_MATCH, SAP.MatchedPlatform) > 0

Hope this helps

 


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