Solved

Update of database deletes values of other fields


Badge

Hi,

i have a workspace which reads a featureclass from ArcSDE with MSSQL Server 2012 with many fields, where one field is named “Post_Processing_Status”. I validate and check the data, do some calculations and create a csv from the data. Is the data from the feature class not valid I update the field “Post_Processing_Status” with the value “mangelhaft” or when it’s OK with “MNA” (originally “erfasst” is in Post_Processing_Status) and write it to the featureclass in the SQL Server.

However when I check the data, the value for Post_Processing_Status is written, but in some rows other field values are now missing, they are filled with blanks. In the original all fields were filled with values.

My procedure is I delete with an AttributeManager all other Attributes, except the OBJECTID and the Post_Processing_Status assign the value “mangelhaft” or “MNA” and link it to an Esri Geodatabase (ArcSDE Geodb) writer with the configuration “UPDATE”, the Transaction Type is set to “Transactions”.I cannot reproduce this error, sometimes it happens, sometimes not. 99% of all data is correct, but some values are deleted.

Anybody knows something, why are some fields now filled with blanks?

Thanks for your help

I use FME Desktop 2016.1.3.0 to create the workspace and is executed by FME Server 2016.1.3.1

icon

Best answer by david_r 11 May 2017, 08:39

View original

8 replies

Userlevel 4

All the attributes defined on the output feature type will be updated, missing attributes will be interpreted as NULL.

I recommend using either the DatabaseUpdater or the SQLExecutor transformer for your scenario.

Badge +16

Beside deleting the attributes going INTO the writer feature type try removing them FROM the writer feature type to make sure that no other attributes are affected, than the ones you want to update

Badge

@itay @david_r Thanks for your Input but in my writer only OBJECTID and Post_Processing_Status is defined. So the other attributes shouldnt be affected or am I miss interpreting something?

Userlevel 4

It does seem like you have configured your output feature type correctly, so it should work as it is. But since it doesn't give you the results you expect, there is a slight chance that it's a bug somewhere. I'd still try to use a DatabaseUpdater and see if the problem is still there, if so it's probably something else. If the problem disappears it might be time for opening a ticket with Safe.

Badge

It does seem like you have configured your output feature type correctly, so it should work as it is. But since it doesn't give you the results you expect, there is a slight chance that it's a bug somewhere. I'd still try to use a DatabaseUpdater and see if the problem is still there, if so it's probably something else. If the problem disappears it might be time for opening a ticket with Safe.

I also think it's kind of a bug. This was driving me nuts. I will try the DatabaseUpdater, thank you David

 

 

 

Userlevel 4
I also think it's kind of a bug. This was driving me nuts. I will try the DatabaseUpdater, thank you David

 

 

 

I can't for the life of me remember the details right now, but I'm pretty sure I've seen some buggy behavior that was very similar to your case. Might be worth contacting Safe support for confirmation, though.
Badge +16

@itay @david_r Thanks for your Input but in my writer only OBJECTID and Post_Processing_Status is defined. So the other attributes shouldnt be affected or am I miss interpreting something?

No, I would contact Safe about this or use the DatabaseUpdater or a SQL statement as advised.

 

 

Userlevel 3
Badge +13

We are currently investigating this. I'll be sure to post an update once we have more information or a resolution.

Reply