Skip to main content
Archived

Change default value of AttributeValueMapper transformer from 'empty string' to

Related products:Transformers
  • March 27, 2020
  • 2 replies
  • 56 views

thijsknapen
Contributor
Forum|alt.badge.img+11

***Note from Migration:***

Original Title was: Change default value of AttributeValueMapper transformer from 'empty string' to 'No action'


A couple days ago I used the AttributeValueMapper transformer to map some values from a database column, to a new attribute value for use in an api. The thing is that only a couple of values had to be 'remapped' for the use in the api, while others could remain the same. In this usecase I was using the same Destination attribute as the source attribute.

Unfortunately I was a bit too hasty, and after a while I discovered that some of my original values were remapped to an empty string.

Personally I was expecting the default value to remain the same in case no mapping is specified for that specific source value, however by default attributes are mapped to an empty string, as an empty string is the default (of the 'default value' parameter). For my usecase, but also in general, I feel it would be more natural to use the default value 'no action' (for the 'default value' parameter).

Also, when using 'no action' for the 'default value' parameter, the (~default) setting of mapping to a different destination attribute, would return a 'missing value' in case no mapping is specified for the source value (which I believe to be more appropriate than an empty string).

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

ebygomm
Evangelist
Forum|alt.badge.img+51
  • Evangelist
  • March 30, 2020

You are able to change the defaults to whatever you think is best and save them as a preset


thijsknapen
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • March 30, 2020

I know, but currently it's not the FME default.