Skip to main content
Question

Can FME write to a MongoDB array data type?


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

4 replies

davideagle
Contributor
Forum|alt.badge.img+21
  • 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
davideagle wrote:

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+21
  • Contributor
  • October 3, 2017
mappinjack wrote:
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.

 


Reply


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