Skip to main content
Solved

FME 2013 and null values

  • January 29, 2013
  • 8 replies
  • 71 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
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.

8 replies

david_r
Celebrity
  • 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
Safer
Forum|alt.badge.img+21
  • Safer
  • 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
Celebrity
  • 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
Supporter
Forum|alt.badge.img+25
  • Supporter
  • 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
Supporter
Forum|alt.badge.img+25
  • Supporter
  • February 20, 2013
Using the AttributeValueMapper you can set NULL as the default value, this is new in FME2013 (might be the SP1 Beta):