Skip to main content
Solved

FME 2013 and null values

  • January 29, 2013
  • 8 replies
  • 34 views

Forum|alt.badge.img
Hello!

 

 

Im someway aware of the problem FME has with handling the NULL-values (http://evangelism.safe.com/fmeevangelist89/).

 

My question is: how is it possible to write NULL values when dealing with ESRI geodatabases?  

 

I have noticed that FME 2013 has an option in AttributeValueMapper transformer to set destination value to Null. Still, it does'nt  seem to work. Running the workspace gives me warnings like:

 

FileGDB Writer: The `kood' attribute could not be written. The containing feature has been dropped.

 

 

The field 'kood' is smallint type and declared to allow NULL values. 

 

 

So the general question is: is it at all possible to set attribute values to NULL inside FME and subsequently write NULL values to geodatabase?

 

 

 

Thank you,

 

Raivo 

 

Estonian Land Board

 

 

 

Best answer by david_r

If your ouput format supports it, I would consider using an SQLExecutor to update the NULL values. This of course assumes that the geometry doesn't change as well, so unfortunately no perfect solution...

 

 

@Robyn: Good to hear that you're working on improving this!

 

 

David
View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, 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.

8 replies

david_r
Evangelist
  • January 29, 2013
Unfortunately, properly handling NULL values is something that FME still struggles with, from a strict database point of view. The easiest way is to delete the attributes where you want to write NULL values, but it can be a bit cumbersome, in my opinion.

 

 

I think your easiest solution would be to download the custom transformer "NullAttributeRemover" from the FME Store. It allows you to specify a list of attributes to check for, and it automatically removes the attributes when they contain either 0 or an empty string. It is also quite simple to modify this to suit your particular needs, if necessary.

 

 

Good luck!

 

 

David

Forum|alt.badge.img
  • Author
  • January 29, 2013

Thanks David!

However, this does not work in case of UPDATE. I can have my NULLs only when inserting features, but my scenario needs to update features aswell, sorry, I forgot to mention that :(

 

 

 

Raivo 

fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • January 30, 2013
Hi Raivo,

 

We are currently working on a project to provide much improved NULL support in FME 2014 so I added your name to one of the problem reports which will be solved by this project. You will be notified when support becomes available in a beta release.

 

 

Cheers,

 

Robyn Rennie

 

FME Desktop Support

david_r
Evangelist
  • Best Answer
  • January 31, 2013
If your ouput format supports it, I would consider using an SQLExecutor to update the NULL values. This of course assumes that the geometry doesn't change as well, so unfortunately no perfect solution...

 

 

@Robyn: Good to hear that you're working on improving this!

 

 

David

Forum|alt.badge.img
  • Author
  • January 31, 2013
Thanks Robyn and David!

 

Using SQLExecutor could be a solution, but its tricky in a way that edits on a versioned geodatabase are managed via delta tables. So SQL UPDATE needs to consider that. I'll take some time to try that atleast.

 

 

Raivo

 

 


Forum|alt.badge.img
  • Author
  • January 31, 2013

I had success using GEODATABASE_SDE writer advanced properties "SQL Statement to Execute After  Translation". 

Multiversioned views is the key (http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/in_PostgreSQL/006z0000001q000000/). So after creating multiversioned view and version for edits, I submitted following lines to FME after sql statement:

SELECT sde.sde_set_current_version('mvedits'); SELECT sde.sde_edit_version('mvedits',1); update hudrograafia_p_2 set atr=null where atr=666;

 

SELECT sde.sde_edit_version('mvedits',2); 

sigtill
Contributor
Forum|alt.badge.img+24
  • Contributor
  • February 11, 2013
Robyn: Please also add me in this loop. As working with NULL-values seems a bit off/on :/. Trying to read a dataset now (have tried both from Excel and from MSSQL) and those features that has the value ID = NULL does not get the value ID. So when I later test for ID = '' it will not return anything. I need to be able to add to the READER (or WRITER) how to handle NULLS. IE, should it read/create NULLs of attributes that are missing.

sigtill
Contributor
Forum|alt.badge.img+24
  • Contributor
  • February 20, 2013
Using the AttributeValueMapper you can set NULL as the default value, this is new in FME2013 (might be the SP1 Beta):

 

 

 


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