Skip to main content
Solved

Hi , I want my FME process to take '0' as 'null' for one of the attribute. Im totally new to FME , not really sure how can i proceed ? could anyone help?

  • April 7, 2021
  • 6 replies
  • 244 views

Hi , I want my FME process to take '0' as 'null' for one of the attribute. Im totally new to FME , not really sure how can i proceed ? could anyone help?

Best answer by redgeographics

The NullAttributeMapper should be able to do that for you, something like this:

Screenshot 2021-04-07 at 16.10.42That top mapping rule, "If attribute value is" is empty right now, that's where you can select null, missing or empty for existing attribute values, in your case you want to check for "0", so leave the top one empty and put that in the second one.

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.

6 replies

redgeographics
Celebrity
Forum|alt.badge.img+62
  • Celebrity
  • Best Answer
  • April 7, 2021

The NullAttributeMapper should be able to do that for you, something like this:

Screenshot 2021-04-07 at 16.10.42That top mapping rule, "If attribute value is" is empty right now, that's where you can select null, missing or empty for existing attribute values, in your case you want to check for "0", so leave the top one empty and put that in the second one.


  • Author
  • April 7, 2021

The NullAttributeMapper should be able to do that for you, something like this:

Screenshot 2021-04-07 at 16.10.42That top mapping rule, "If attribute value is" is empty right now, that's where you can select null, missing or empty for existing attribute values, in your case you want to check for "0", so leave the top one empty and put that in the second one.

where i can find this nullAtttributeMapper ? is it something configured in transformer?

 


redgeographics
Celebrity
Forum|alt.badge.img+62

where i can find this nullAtttributeMapper ? is it something configured in transformer?

 

It's a transformer in FME Workbench, it should be in your Transformer Gallery and if you type in Quick Add it should show up.

The FME Desktop Advanced training course has a section on the NullAttributeMapper in its first chapter, that should give you some background info and if you work through the excercise it'll all be clear.


  • Author
  • April 7, 2021

where i can find this nullAtttributeMapper ? is it something configured in transformer?

 

Okay , I checked that video. So are we suppose to add that nullAttrubiteMApper explicitly ? as it is old FMW file ... not sure if i can add any transformer in between ... It might hamper the processs. COuld you please help on it ?

 


kailinatsafe
Safer
Forum|alt.badge.img+23

Hello @fmekps​ , sounds like you are getting close! Your workflow should be 1. Read in source data 2. Add a NullAttrubiteMapper transformer (Transformers > Add Transformer) 3. Write out your results. I used an excel spreadsheet to test:

 

NULL_Img1 

I've also attached before/after results:

 

NULL_Img2 

Let me know if you get stuck anywhere. Hope this helps, Kailin. 


  • Author
  • April 8, 2021

Hello @fmekps​ , sounds like you are getting close! Your workflow should be 1. Read in source data 2. Add a NullAttrubiteMapper transformer (Transformers > Add Transformer) 3. Write out your results. I used an excel spreadsheet to test:

 

NULL_Img1 

I've also attached before/after results:

 

NULL_Img2 

Let me know if you get stuck anywhere. Hope this helps, Kailin. 

Thanks much for the help & info! it worked