Skip to main content
Has anybody tried to update specific attributes to an existing table?

 

 

I want to update a few attributes without changing the structure of my table.

 

 

Ex: I have an existing Hydrants feature class (GeoMedia SQL database) and I add 5 new hydrants to my workspace.  I update the Neighbourhood and Mapsheet attributes they are located in using the PointOnAreaOverlayer.  The only problem is i'm reading and writing to the same Feature .....this in return doubles my amount of records or overwirtes (drops) my table completely...  

 

 

Bottom line is, can FME Read AND Write to the same feature class without changing the output name / structure of the table?

 

 

 

 

 

Hi,

 

 

The DatabaseUpdater (FME 2014+) or the SQLExecutor might help you.

 

 

Takashi
Yes just make sure you are setting the writer to update without dropping the table, also make sure you are importing the correct feature types.
Itay, I have set the Format Parameters to "No" for Drop Table First & Truncate Table first.  This just appends the features and dubbles the amount of records? Is their another setting i'm missing?

 

 

(does not update the existing).  Takashi, I am currently running 2013....
The DatabaseUpdater is new one, but the SQLExecutor can be used in FME 2013. It may be one of choices.
Did you make sure the writer mode is set to update ? Are you specifying a fme_where value?
Takashi, i'm not sure how to incorporate the SQLExecutor, would you be able to give an example?

 

 

Itay, for my Writer, I do not have the Writer Mode Parameter? is that option only available for certain types of writers? (mine is Intergraph GeoMedia SQL).  I have tried to to incorporate the fme_db_operation UPDATE method but not luck.  I have attached an image of my workspace so you have an idea of what i'm trying to accomplish.  I'm trying to update 2 existing attributes (NeighbourhoodName & Address) if my Hydrants fall within a the Neighbourhood boundary and are close to a parcel.

 

 


Just create "update" statement based on related attributes and execute it with the SQLExecutor.

 

-----

 

update TableName

 

set SomeField1 = '@Value(Attr1)', SomeField2 = '@Value(Attr2)'

 

where PrimaryKeyField = '@Value(ID)'

 

-----

Reply