Question

Can FME write to a MongoDB array data type?

  • 3 October 2017
  • 4 replies
  • 4 views

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


4 replies

Badge +10

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?

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!

 

 

Badge +10
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.

 

 

Badge +6

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