Hi, I am working on translating data from numbers to phrases. I know using the String Replacer and Attribute Value Mapper is the best for this, but I am having issues when trying to map more than one value to one field. An example would be the reason_of_given_set has multiple values, I need these values to populate with given phrases, each number represents a phrase. I provided the parameters of the transformer I am using below. I also tried creating 14 different string replacers to represent each number and each time the output shows blank at the attributes with multiple values. I am probably using the Attribute Value Mapper transformer incorrectly and its not designed to do this, or I have the parameters set incorrectly. Does anyone know how I can fix this?
Do you have geometry associated with these records? If not, you could do something like this:
- Use an AttributeSplitter to create a list of those attributes
- With ListExploder, create separate features for each list item.
- Process those through your AttributeValueMapper, and then Aggregate the results (Group By set to _element_index, and Attributes to Concatenate set to _looked_up_reason_of_given_set).
If you do have geometry associated, the Aggregator may skew that. You could always Deaggregate after this workflow, I suppose.
Do you have geometry associated with these records? If not, you could do something like this:
- Use an AttributeSplitter to create a list of those attributes
- With ListExploder, create separate features for each list item.
- Process those through your AttributeValueMapper, and then Aggregate the results (Group By set to _element_index, and Attributes to Concatenate set to _looked_up_reason_of_given_set).
If you do have geometry associated, the Aggregator may skew that. You could always Deaggregate after this workflow, I suppose.
If there is geometry, you can use a GeometryExtractor to temporarily save that to an attribute and then after aggregating a GeometryReplacer to rebuild it.
@dustin It worked great! Thank you! One las question, how do I get the new values into the original data? Right now when I run the workspace it only shows the new values I created.