Skip to main content
Question

NullValueMapper: testing for NOT Empty


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
...Firefox works better for posting apparently...im using it now.

 

 

Anyway, you might have understand the question by now.

 

Is it not possible to test for empty strings in the NullValueMapper?

 

NullValueMapper is enticing me to use it to find a way to update Parameters, but it only tests for values or "Null/Empty/Missing"..but not "NOT Null/Empty/Missing".

 

 

Can i assume this not possible then?

 

 

8 replies

takashi
Influencer
  • March 13, 2015
Hi Gio, how's this?

 


takashi
Influencer
  • March 14, 2015
The StringReplacer (using regex) could also be used.

 

And, the Tester may be the easiest way to check if an attribute is not empty/null/missing. The != operator interprets both <null> and <missing> attribute to an empty string when comparing the operands.

 

attr != <leave blank the Right Value column>

gio
Contributor
Forum|alt.badge.img+15
  • Author
  • Contributor
  • March 16, 2015
Actually i was trying to update a parameter...not an attribute

 

As this transformer let's you choose one in the "selected Attributes" when the Map is set to "selected Attributes".

 

 

I was surprised so i had to try, but it does not appear to want to update any parameter you choose.

 

No matter what regexp you try.

 

 

If you choose a attribute, it works, but that was not what i was asking.

 

 

So i wonder why is there an option to choose a Parameter to map?

 

 

 

 

takashi
Influencer
  • March 16, 2015
You can check if a parameter value is empty or not with the Tester, but I don't think its value can be updated with any transformer.

gio
Contributor
Forum|alt.badge.img+15
  • Author
  • Contributor
  • March 17, 2015
yes, i know.

 

 

but as one can choose "parameter" in the "selected Attributes" when the Map is set to "selected Attributes" , i was qurious if it might be possible after all.

 

 

So again:why is there an option to choose a Parameter to map?

takashi
Influencer
  • March 17, 2015
maybe I finally got your question point.

 

 

I cannot answer to your question straight, but I know a usage of Parameter for the Selected Attributes. That is, to get "attribute list" through a published parameter in a custom transformer.

 

As far as I know, that's the only usage.

 

 

Try creating a published parameter in a custom transformer definition.

 

 


gio
Contributor
Forum|alt.badge.img+15
  • Author
  • Contributor
  • March 17, 2015
Yes, i have seen the AttrLlist question some days ago.

 

 

But i don't think it is logical to place it in a Mapping section. In the AttrList use it is more a parameter in wich is searched, and if found a attribute is subsequently mapped. Not a parameter.

 

It should be under "parameter to search in" or "mappingparameter" and not under attributes to match.

takashi
Influencer
  • March 18, 2015
There are some transformers which have "attribute list" type parameter similar to the NullAttributeMapper. e.g. AttributeTrimmer, StringCaseChanger, StringFormatter, StringReplacer etc.

 

These transformers will manipulate attribute values through attribute names specified by the parameter, and also the parameter can be set to a user parameter.

 

Comparing to these transformers, I cannot find something conceptually special in the NullAttributeMapper...

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