Skip to main content
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 !
Hi,

 

 

have you looked at the NullAttributeMapper?

 

 

David
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 !

 

 
Sorry about my previous post !

 

Logger transformer shows that NullAttributeMapper works well

 

 

 

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

 

 

A.

 

 
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 !

Reply