Let's say I have a record
{
_id: 100,
foo: {
bar: 0,
baz: 1
}
}
and I want to update it with mongoimport with CSV
_id,foo.kek
100,9000
However,
mongoimport --type csv --file myfile.csv --headerline --mode merge
would rewrite the sub-BSON object foo entirely:
{
_id: 100,
foo: {
kek: 9000
}
}
Is there any way to do the partial update
{
_id: 100,
foo: {
bar: 0,
baz: 1,
kek: 9000
}
}
with mongoimport? Is there any other efficient way to do it (I have millions of records)?
MongoDB server version: 3.0.14
mongoimport version: r3.4.2
Thanks in advance!