Skip to main content
Solved

Replacing attribute values with TestFilter output port values

  • November 12, 2019
  • 2 replies
  • 240 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...

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.

2 replies

Forum|alt.badge.img+2
  • 1891 replies
  • 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
  • 13 replies
  • November 14, 2019

Thanks Mark, that works for me.