span8
span4
span8
span4
Hello,
I am having problems with Mongo reader/writer.First I read from Mongo,it works fine and I add several transformers (Clipper,spatialFilter - comparing with other datasets) and then I want to write back to mongo.When I check the output from the Data Inspector,it seems to be fine,geometry is the way I expected and the result looks good.But the Mongo Writer gives back the original geometry.
in writer settings,I put "Document Source":JSON Attribute -> mongodb_json
Thanks!
Please edit the properties on the at_vie_all_tmp4 feature type and expose the format attribute mongodb_id.
In the properties for the output feature type test_,set the Parameter Document ID Attribute to mongdb_id.You may also need to set the Geometry field name to 'geometry'.
@DaveAt亚搏在线SafeI can now share my workspace.question-fme-hub.fmw
So the goal is to keep the attributes as in: "lines with attributes coming from Mongo* see example" (The structure looks similar to this:image-1.png)
and use the changed geometry from the FME transformation.
Thank you
Could it be containing a format attribute with the type of geometry?
If reader and writer have the same format,the writer gives a higher priority to format attributes and if that contained type it will remain the original geometry type instead of the converted geometry.
The quick solution would be using the BulkAttributeRemover removing all format attributes using 'mongodb_*' to be removed.
Hope this helps.
Please change the Document Source to Feature.It is the feature that has been modified by the transformers,while the json attribute contains the original geometry.
@DaveAt亚搏在线SafeI attached my workspace in the answer above.Could you maybe have a look at it?
I still have to deal with the same problem...
Can FME write to a MongoDB array data type?2 Answers
Use mongodb writer to update existing documents2 Answers
How does one apply a filter to the MongoDB reader to limit results?1 Answer
Error on writing Aggregator results to Writer2 Answers
The ESRIJSON writer apparently does not write 3D coordinates in FME 20162 Answers
© 2019 亚搏在线Safe Software Inc |Legal