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?


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.

View original
Did this help you find an answer to your question?

6 replies

redgeographics
Celebrity
Forum|alt.badge.img+49
  • 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
redgeographics wrote:

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+49
fmekps wrote:

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
fmekps wrote:

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+21

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
kailinatsafe wrote:

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


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