Skip to main content
Question

Merge features by attribute that contains string from target attribute

  • January 27, 2017
  • 4 replies
  • 385 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).

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, 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.

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

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