Skip to main content
Question

How to drop and create Mongodb collection(table) ?


f.kemminje
Contributor
Forum|alt.badge.img+11

I am reading from oracle spatial table and writing to Mongodb. once I written to mongo with some sample data, and i want to re run my fme script again for whole, by drop and create method(mongo db collection). I set the writer option to "drop and create", but its giving error. error msg saying that

MONGODB writer: Layer layerDataPolygon already exists, CreateLayer failed. Use the layer creation option OVERWRITE=YES to replace it.(red color)

where to set OVERWRITE=YES(layer creation option) ? as per fme's error msg

Can anyone pls help?

 

 

4 replies

f.kemminje
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • January 14, 2020

please refer image


harmen_kampinga
Forum|alt.badge.img+2

As far as I know, is the LAYER mentioned an spatial collection. The 'Layer' then is an OGR term for the MONGODB 'Collection'

 

So when you have to overwrite the Layer, it's meant to overwrite the 'Collection'.

harmen_kampinga
Forum|alt.badge.img+2
harmen_kampinga wrote:

As far as I know, is the LAYER mentioned an spatial collection. The 'Layer' then is an OGR term for the MONGODB 'Collection'

 

So when you have to overwrite the Layer, it's meant to overwrite the 'Collection'.

@fkemminje , you can also have a look here: https://knowledge.safe.com/questions/39933/use-mongodb-writer-to-update-existing-documents.html

 


harmen_kampinga
Forum|alt.badge.img+2

@fkemminje : did you made any progress so far?


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