Skip to main content
Solved

Replacing attribute values with TestFilter output port values

  • November 12, 2019
  • 2 replies
  • 181 views

Forum|alt.badge.img+1

Hello all,

I have a TestFilter that directs my input data into multiple branches for further transformation and I have dozens of test conditions within this TestFilter, similar to below:

If Test condition @Value(field1) = A to Output port 'Road'

Else If Test condition @Value(field1) = B to Output port 'River'

Else If Test condition @Value(field1) = C to Output port 'School'

etc, etc.....

 

Is there a way i can then use these port values to replace the original input attribute value for this field? For example:

Replace all attribute values of 'A' with 'Road'

Replace all attribute values of 'B' with 'River'

etc, etc

I'm trying to find a way of avoiding having to create dozens of repetitive transformers after each port to make this attribute value change and hoping to reuse the effort made thus far with in creating the existing TestFilter

Does anyone know if this is achievable?

TIA,

R

Best answer by markatsafe

@robinb You can copy your tests from the TestFilter into the Conditional Value of the AttributeCreator. Although the AttributeCreator would accomplish what you want, the tests are a bit hidden making the workspace a little harder to maintain. Perhaps add your vote to this Idea.

AttributeCreator Conditional Value...

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

2 replies

Forum|alt.badge.img+2
  • Best Answer
  • November 12, 2019

@robinb You can copy your tests from the TestFilter into the Conditional Value of the AttributeCreator. Although the AttributeCreator would accomplish what you want, the tests are a bit hidden making the workspace a little harder to maintain. Perhaps add your vote to this Idea.

AttributeCreator Conditional Value...


Forum|alt.badge.img+1
  • Author
  • November 14, 2019

Thanks Mark, that works for me.


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