Skip to main content
Question

Can the attribute value mapper transformer map multiple values in one record?


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. imageimage.pngAttribute Value MapperI 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?

3 replies

dustin
Influencer
Forum|alt.badge.img+30
  • Influencer
  • January 17, 2024

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).

 

imageIf you do have geometry associated, the Aggregator may skew that. You could always Deaggregate after this workflow, I suppose.


redgeographics
Celebrity
Forum|alt.badge.img+49
dustin wrote:

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).

 

imageIf 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.


  • Author
  • January 23, 2024

@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.


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