Question

Merge features by attribute that contains string from target attribute

  • 27 January 2017
  • 4 replies
  • 57 views

Badge

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

Userlevel 4

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.

Badge

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

 

 

Badge +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

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

 

Reply