Thanks.
Hi!
I have a csv I want to import to mongo. Using the --files I'm able to assign particular names to each field.
Is it possible to build fields as not simple fields but as embedded documents?
As an example, what I've tried so far
mongoimport -d test -c zip -f ,"loc.lat","loc.lon",code --type csv -drop ES.csv
The result for this is
{
"_id" : ObjectId("506c2bc2be9fc8b35104575b"),
"loc.lat" : 37.4333,
"loc.lon" : -1.7333
}
What I'd like is to get something like:
{
"_id" : ObjectId("506c2bc2be9fc8b35104575b"),
"loc" : {
"lon" : -1.7333
Is it possible directly via mongoimport?
Thanks!
-Víctor