Skip to main content
Question

Can FME write to a MongoDB array data type?

  • October 3, 2017
  • 4 replies
  • 63 views

Is it possible to write to MongoDB as an array datatype, either from an FME list or otherwise? Thanks!

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

davideagle
Contributor
Forum|alt.badge.img+22
  • Contributor
  • October 3, 2017

I'm afraid it doesn't look like it right now: http://docs.safe.com/fme/2017.0/html/FME_Desktop_Documentation/FME_ReadersWriters/mongodb/user_attributes_w.htm

However, is a Mongo DB array actually a DataType? It looks like it might be a JSON document in it's own right and if so as FME Can handle JSON that might be possible. Can you provide a little more detail?


  • Author
  • October 3, 2017

I'm afraid it doesn't look like it right now: http://docs.safe.com/fme/2017.0/html/FME_Desktop_Documentation/FME_ReadersWriters/mongodb/user_attributes_w.htm

However, is a Mongo DB array actually a DataType? It looks like it might be a JSON document in it's own right and if so as FME Can handle JSON that might be possible. Can you provide a little more detail?

Doesn't look too promising based on that link! The goal is to insert a list of integers (e.g. [2, 3, 4]) into a MongoDB array, which should be an actual datatype. Is it possible to insert a JSON document independently of the writer or override the writer's datatypes? Thanks @1spatialdave!

 

 


davideagle
Contributor
Forum|alt.badge.img+22
  • Contributor
  • October 3, 2017
Doesn't look too promising based on that link! The goal is to insert a list of integers (e.g. [2, 3, 4]) into a MongoDB array, which should be an actual datatype. Is it possible to insert a JSON document independently of the writer or override the writer's datatypes? Thanks @1spatialdave!

 

 

I really don't think so. I suggest you escalate this to a support case with your FME provider or direct with support@safe.com. It may even be worth adding 'support for MongoDB array datatype' as an FME idea over here too. Sorry I can't be more help.

 

 


trentatsafe
Safer
Forum|alt.badge.img+6
  • Safer
  • October 3, 2017

Hello, @mappinjack,

 

 

As discussed via LiveChat. It is possible to write an Array to MongoDB using FME 2017.1. This can be done by writing a list attribute to a 'String' datatype. This will show up as an array once viewed inside your MongoDB viewer. It should be noted, currently, this will show up as an array inside of an object.

The ListBuilder transformer may be tremendously helpful to create the arrays.

 

I hope this helps.