Skip to main content
Solved

Using Tester transformer with 'Right Value' coming from another transformer


Hello,

 

 

I have a set of lines, with the attribute 'name' coming from a first dataset and another line with the attribute 'linked_line_name' coming from a second dataset.

 

The second dataset only contains one line.

 

I'd like to select the line from the first dataset where 'name' equals 'linked_line_name'.

 

So far I've tried using the Tester transformer but can't seem to make it work as I would like to.

 

 

I created and joined a sample workspace to illustrate my problem a bit more:

 

The first dataset contains 4 lines, the second just 1.

 

I want to select the second line 'def' from the first dataset as its 'name' attribute equals 'linked_line_name' from the second dataset.

 

 

I understand why the parameters I've entered for the Tester transformer won't work but I can't figure out a way to achieve what I want. Any idea?

 

 

Thanks a lot!

Elise

Best answer by ebygomm

You can use a featuremerger to perform this test. Send the lines to the requestor, with the single line to the supplier merging on name:linked_line_name and merging attributes only. Only lines which match will come out the merged port

View original
Did this help you find an answer to your question?

4 replies

ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • Best Answer
  • January 16, 2017

You can use a featuremerger to perform this test. Send the lines to the requestor, with the single line to the supplier merging on name:linked_line_name and merging attributes only. Only lines which match will come out the merged port


itay
Supporter
Forum|alt.badge.img+16
  • Supporter
  • January 16, 2017

As pointed out the FeatureMerger is one way to go, optonally if you prefer a more SQL apporach the InlineQuerier is another option.

The reason the tester doesnt work is because the features do not get joined (merged) and therefore the test cannot be carried out...


  • Author
  • January 16, 2017
ebygomm wrote:

You can use a featuremerger to perform this test. Send the lines to the requestor, with the single line to the supplier merging on name:linked_line_name and merging attributes only. Only lines which match will come out the merged port

Thank you so much, this is exactly what I was looking for, this community seems amazing!

 

 


  • Author
  • January 16, 2017
itay wrote:

As pointed out the FeatureMerger is one way to go, optonally if you prefer a more SQL apporach the InlineQuerier is another option.

The reason the tester doesnt work is because the features do not get joined (merged) and therefore the test cannot be carried out...

Works perfectly too, thank you! I didn't know about this transformer, seems like I'm going to use it a lot!

 

Which option would you say is better?

 

In this article it is mentionned that the InlineQuerier can be used as a replacement for multiple FeatureMergers. What about a single FeatureMerger?

 

 


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