Insert array of double datatype for MongoDB

Six Stars

Insert array of double datatype for MongoDB

I am trying to insert the following json into mongodb using tMongoDBInput-->tmap-->tMongoDBOutput.  The "coordinates" values show up as string in the output collection. All through the job the values(longitude, latitude) of coordinates are defined as double. I want them to have a double datatype. I have defined "coordinates" with Node Status = loop element and @class with Static Value = array. @type is defined as double in the Link target of tMongoDBOutput.  But still data is showing up as string in the array. What am i doing wrong ?


{
"_id" : "5ab51c8b2c75d21a40665d76",
"location" : {
"position" : {
"type" : "Point",
"coordinates" : [
"85.0",
"65.0"
]
}
}
}

Tags (1)
Six Stars

Re: Insert array of double datatype for MongoDB

This seems to be a basic functionality that should be accommodated in Talend but now thinking this is not possible through the tool and have to use custom code to update datatype ?