Skip to main content
Question

Null values in FME 2014

  • February 11, 2015
  • 4 replies
  • 46 views

ari
Contributor
Forum|alt.badge.img+4
Hi all,

 

 

I'm working with an FME Desktop 2014 workspace that writes data from a fileGeodatabse to a GML compliant with INSPIRE Address Schema. The process is working but I want to improve the treatment of <null> fields.

 

 

More precisely, I would like NOT to write those fields with <null> value.

 

Is there any transformer that can help me with that ?

 

 

So, as an example, now I have this result: 
 ... 		<ad:designator> 			<ad:LocatorDesignator> 				<ad:designator>21</ad:designator> 				<ad:type>addressNumber</ad:type> 			</ad:LocatorDesignator> 		</ad:designator> 		<ad:designator> 			<ad:LocatorDesignator> 				<ad:designator/> 				<ad:type/> 			</ad:LocatorDesignator> 		</ad:designator> 		<ad:designator> 			<ad:LocatorDesignator> 				<ad:designator>23</ad:designator> 				<ad:type>addressNumber</ad:type> 			</ad:LocatorDesignator> 		</ad:designator> 		<ad:designator> 			<ad:LocatorDesignator> 				<ad:designator/> 				<ad:type/> 			</ad:LocatorDesignator> 		</ad:designator> 		<ad:designator> 			<ad:LocatorDesignator> 				<ad:designator/> 				<ad:type/> 			</ad:LocatorDesignator> 		</ad:designator> 		<ad:designator> 			<ad:LocatorDesignator> 				<ad:designator>25114</ad:designator> 				<ad:type>postalDeliveryIdentifier</ad:type> 			</ad:LocatorDesignator> 		</ad:designator> 	...
 And, following the previous example, I would like to have this result (i.e: only those files not <null>): 
 ... 		<ad:designator> 			<ad:LocatorDesignator> 				<ad:designator>21</ad:designator> 				<ad:type>addressNumber</ad:type> 			</ad:LocatorDesignator> 		</ad:designator> 		<ad:designator> 			<ad:LocatorDesignator> 				<ad:designator>23</ad:designator> 				<ad:type>addressNumber</ad:type> 			</ad:LocatorDesignator> 		</ad:designator> 		<ad:designator> 			<ad:LocatorDesignator> 				<ad:designator>25114</ad:designator> 				<ad:type>postalDeliveryIdentifier</ad:type> 			</ad:LocatorDesignator> 		</ad:designator> 	...
 

 

Many thanks in advance !
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.

4 replies

david_r
Celebrity
  • February 11, 2015
Hi,

 

 

have you looked at the NullAttributeMapper?

 

 

David

ari
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • February 12, 2015
Thanks David for your quick answer !!!

 

I haven't used before this transformer so now I doing some tests.

 

Maybe I am doing something wrong but I don't get the expected output.

 

 

This is what I have without using NullAttributeMapper 

 

(partial view of GML with FME Data Inspector)

 

 

 

And this the output using the NullAttributeMapper Transformer:

 

 

 

There are only a few registries in designator{2} with data, but designator{5} always contains data. I have defined the following parameters in the transformer:

 

 

 

 

As far as I understood, ONLY in case that one of the selected attributes is <null> or <empty> will not be written. So, What I'm doing wrong ????

 

I have try to use the transformer in different places in my workspace but I get the same result.

 

 

Many Thanks in advance !

 

 

ari
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • February 12, 2015
Sorry about my previous post !

 

Logger transformer shows that NullAttributeMapper works well

 

 

 

maybe the problem is in the index of designator{}.... 

 

 

A.

 

 

ari
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • February 12, 2015
Confirmed! It was a problem with designator{} attribute indexes.

 

I have solved it with a very little piece of code in pythonCaller.

 

 

Thanks again for your inspiration !