Skip to main content

I am trying to populate a new field with a value from another field. It is not a simple attribute copy. Each record is getting the value from a different field that is specified in another field.

For example: I have the table below and I want to populate NEW_FIELD with one of the values of fields FIELD1 through FIELD4 based on what is provided in FIELD_TO_USE. This has to be dynamic (no hard coded TestFilter as I am doing that now).

FIELD1FIELD2FIELD3FIELD4FIELD_TO_USENEW_FIELD1234FIELD115678FIELD26ABCDFIELD3CEFGHFIELD4H

AttributeCreator with:

New attribute NEW_FIELD

Value @Value(@Value(FIELD_TO_USE))


Alternatively, the AttributeDereferencer could also be used here.


AttributeCreator with:

New attribute NEW_FIELD

Value @Value(@Value(FIELD_TO_USE))

Thanks Erik!

 

 


Alternatively, the AttributeDereferencer could also be used here.

Thanks Takashi. I don't know which method I will use. They are both one transformer.

 

 

It feels like I learn a new transformer every week.

 

 


Reply