Skip to main content
Question

How to look in specific attribute for specific values from other attribute ?


gogopotter90
Contributor
Forum|alt.badge.img+13

Hello ,

i habe two source data

first source data contains attribute called

id

3839464

3937793

837390

389304

——

second source data contains

cable network attribute

3839464-hsld282-owuwpw

37394-283994

383894-Jagdhorn-2839463

389304-hdjskd-dddjf

 

how could I search at attribute cable network

by using id attribute ?

i would like to know if any of id value exist in cable network attribute .

fme 2021

thanks in advance

8 replies

todd_davis
Supporter
Forum|alt.badge.img+21
  • Supporter
  • December 5, 2023

Can you get to 2023? If you can, then I have an answer. You really need 2023 as it contains a bug fix which allowed me to add some functionality to the AttributeValueSearcher that caters for this scenario.

 

image


todd_davis
Supporter
Forum|alt.badge.img+21
  • Supporter
  • December 5, 2023
todd_davis wrote:

Can you get to 2023? If you can, then I have an answer. You really need 2023 as it contains a bug fix which allowed me to add some functionality to the AttributeValueSearcher that caters for this scenario.

 

image

Actually, as you are only searching one field, then you can do it with ease...without the above. Use the same method through to the featurejoiner and following the featurejoiner use a Tester, and test the "cable network contains id" (of course that is pretty wild in it selection with an id of 1 being found in any cable network value that contains 1, so you may need to add in some extra logic). That will return all the values in the cable network that match


dustin
Influencer
Forum|alt.badge.img+30
  • Influencer
  • December 5, 2023

There is a custom transformer located in FME Hub called FuzzyStringCompareFrom2Datasets. I'm not positive it will give the expected result in this scenario, but it may be worth a shot. https://hub.safe.com/publishers/cdalessandro/transformers/fuzzystringcomparefrom2datasets


takashi
Contributor
Forum|alt.badge.img+21
  • Contributor
  • December 5, 2023

Hi @gogopotter90​ ,

Looks like a cable network can be split by hyphen into two or more parts and the first part is always id. If my observation is correct, you can just split it with AttributeSplitter and then use ListIndexer (List Index to Copy: 0) to extrat the first part i.e. id.


gogopotter90
Contributor
Forum|alt.badge.img+13
  • Author
  • Contributor
  • December 7, 2023
takashi wrote:

Hi @gogopotter90​ ,

Looks like a cable network can be split by hyphen into two or more parts and the first part is always id. If my observation is correct, you can just split it with AttributeSplitter and then use ListIndexer (List Index to Copy: 0) to extrat the first part i.e. id.

It is not always the first part .

i am not sure which part does it .


gogopotter90
Contributor
Forum|alt.badge.img+13
  • Author
  • Contributor
  • December 7, 2023
dustin wrote:

There is a custom transformer located in FME Hub called FuzzyStringCompareFrom2Datasets. I'm not positive it will give the expected result in this scenario, but it may be worth a shot. https://hub.safe.com/publishers/cdalessandro/transformers/fuzzystringcomparefrom2datasets

It takes too long time to get output ,i have tried it


gogopotter90
Contributor
Forum|alt.badge.img+13
  • Author
  • Contributor
  • December 7, 2023
todd_davis wrote:

Actually, as you are only searching one field, then you can do it with ease...without the above. Use the same method through to the featurejoiner and following the featurejoiner use a Tester, and test the "cable network contains id" (of course that is pretty wild in it selection with an id of 1 being found in any cable network value that contains 1, so you may need to add in some extra logic). That will return all the values in the cable network that match

I have only Fme 2021 .

But it is not clear what should I do ,after feature joined but it looks too much data to join between left and right .

but anyway what should I do after tester .

do you have other method could I apply without taking too much time


geomancer
Evangelist
Forum|alt.badge.img+47
  • Evangelist
  • December 7, 2023

If the value of 'id' can be in any part of 'cable network', do something like this (based on the workflow presented by todd_davis):

image


Reply


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