Skip to main content

I can't figure out how to use a mongodb writer to update existing documents (specifically, I want to insert new elements in a list within the existing json structure)

 

 

I don't even see any parameter to set the writer to update or upsert.

Turns out we don't have a true update capability yet.

That said, you can use the Mongo reader to pull out the document you want, and then set the writer into PUT mode to put it back in effectively updating the existing one. In the middle you'd have updated your JSON appropriately.

 

The FME 2017 doc has the specs here: http://docs.safe.com/fme/2017.0/html/FME_Desktop_Documentation/FME_ReadersWriters/couchdb/format_parameters_w.htm

If you're still stumped, let us know and we can mock up an example.


Turns out we don't have a true update capability yet.

That said, you can use the Mongo reader to pull out the document you want, and then set the writer into PUT mode to put it back in effectively updating the existing one. In the middle you'd have updated your JSON appropriately.

 

The FME 2017 doc has the specs here: http://docs.safe.com/fme/2017.0/html/FME_Desktop_Documentation/FME_ReadersWriters/couchdb/format_parameters_w.htm

If you're still stumped, let us know and we can mock up an example.

Thanks for the input.

 

 

Are there any plans to improve on the mongo compatibility to fit in more of the api tools ? Even mongo shell calls ?

 

 

I will try to compare the performance of this workaround and mine (using a python caller)

 

 


Hi,

Have you got a visual exemple of updating a mongodb collection with FME 2018 ?

Thanks

Regards


Reply