Can you check what output do you get when adding "-v" (verbose) to that command?
I've tried and if have an exact document existing already in the database/collection, no error message is displayed. This is the same if you have twice the same document in the json file.
Can you provide a sample of the *articles_split.json*?
Thanks for your reply.--verbose is not giving any additional information that ERROR:Multiple occurrence.Also the data which I'm trying to import is being exported from some other MongoDB database so there are lean chances of any duplicate documents.The files are confidential so unfortunately won't be able to share the data. Without that can you provide any guidance.
On Friday, September 28, 2012 9:52:40 PM UTC+5:30, Gianfranco wrote: > Can you check what output do you get when adding "-v" (verbose) to that > command?
> I've tried and if have an exact document existing already in the > database/collection, no error message is displayed. > This is the same if you have twice the same document in the json file.
> Can you provide a sample of the *articles_split.json*?
> On Friday, September 28, 2012 10:34:49 AM UTC+1, Anushree Bhate wrote:
>> Hi All,
>> I'm repeatatively getting this error while trying to import data in >> mongoDB from a json file.I'm running following command to do so
>> *D:\Old D >> Drive\Downloads\MongoDB\mongodb-win32-x86_64-2.2.0\mongodb-win32-x86_64** >> -2.2.0\bin*>*mongoimport -d test -c articles --type json --file* * >> D:\Projects\Xurch\P**arsely >> data\articles_split.json.01\articles_split.json*
>> **
>> ERROR: multiple occurrences
>> Can somebody please suggest if I'm doing something wrong
Yeah I tried --verbose(--vvvvv) still it didn't give me anything more than ERROR:Multiple occurrence.The data/files I'm trying to import is the data exported from another MongoDB database so chances of having duplicate document is lean.The files/data ic confidential so may not be able to share. One most important thing is even when I tried to import the file in a fresh database it didn't succeed and gave same error.
Please provide some hint if you came across this error before
On Friday, September 28, 2012 9:52:40 PM UTC+5:30, Gianfranco wrote: > Can you check what output do you get when adding "-v" (verbose) to that > command?
> I've tried and if have an exact document existing already in the > database/collection, no error message is displayed. > This is the same if you have twice the same document in the json file.
> Can you provide a sample of the *articles_split.json*?
> On Friday, September 28, 2012 10:34:49 AM UTC+1, Anushree Bhate wrote:
>> Hi All,
>> I'm repeatatively getting this error while trying to import data in >> mongoDB from a json file.I'm running following command to do so
>> *D:\Old D >> Drive\Downloads\MongoDB\mongodb-win32-x86_64-2.2.0\mongodb-win32-x86_64** >> -2.2.0\bin*>*mongoimport -d test -c articles --type json --file* * >> D:\Projects\Xurch\P**arsely >> data\articles_split.json.01\articles_split.json*
>> **
>> ERROR: multiple occurrences
>> Can somebody please suggest if I'm doing something wrong
Yeah I tried --verbose(--vvvvv) still it didn't give me anything more than ERROR:Multiple occurrence.The data/files I'm trying to import is the data exported from another MongoDB database so chances of having duplicate document is lean.The files/data ic confidential so may not be able to share. One most important thing is even when I tried to import the file in a fresh database it didn't succeed and gave same error.
Please provide some hint if you came across this error before
This problem is resolved.But the issue was silly and was nothing to do with 'multiple occurrences',it was a file path issue so instead of *mongoimport -d test -c articles --type json --file** D:\Projects\Xurch\Parsely data\articles_split.json.01\articles_split.json* when I ran *mongoimport -d test -c articles --type json --file "D:\Projects\Xurch\P**arsely data\articles_split.json.01\articles_split.json".*It ran successfully,silly issue.Learning is at times MongoDB gives misleading error message which has nothing to do with cause of error.
On Monday, October 8, 2012 6:51:06 AM UTC+1, Anushree Bhate wrote:
> Hi All,
> This problem is resolved.But the issue was silly and was nothing to do > with 'multiple occurrences',it was a file path issue so instead of *mongoimport > -d test -c articles --type json --file** D:\Projects\Xurch\Parsely > data\articles_split.json.01\articles_split.json* when I ran *mongoimport > -d test -c articles --type json --file "D:\Projects\Xurch\P**arsely > data\articles_split.json.01\articles_split.json".*It ran > successfully,silly issue.Learning is at times MongoDB gives misleading > error message which has nothing to do with cause of error.
> On Friday, September 28, 2012 3:04:49 PM UTC+5:30, Anushree Bhate wrote:
>> Hi All,
>> I'm repeatatively getting this error while trying to import data in >> mongoDB from a json file.I'm running following command to do so
>> *D:\Old D >> Drive\Downloads\MongoDB\mongodb-win32-x86_64-2.2.0\mongodb-win32-x86_64** >> -2.2.0\bin*>*mongoimport -d test -c articles --type json --file* * >> D:\Projects\Xurch\P**arsely >> data\articles_split.json.01\articles_split.json*
>> **
>> ERROR: multiple occurrences
>> Can somebody please suggest if I'm doing something wrong