Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account
List archives

mongoimport -f OR --fieldFile

update failed b/c of StaleConfigException
(50 lines)
facing issues with unique and dropDups
(36 lines)
Feb 8, 2012
Charles Agnello
Charles Agnello
The documentation regarding this feature isn't too clear to me.

Does this imply anything about the data you are importing if you use this 
option? What I mean is if I use mongoimport with "-f" or "--fieldFile" does

this mean that the data does not contain key-value pairs only the values? 
Or does it mean that these fields are required? Or does it mean that those 
fields will get automatically populated if it doesn't exist in the data 
file with a null value?

Thanks,
Charles





Reply
Messages in this thread
mongoimport -f OR --fieldFile
reply Re: mongoimport -f OR --fieldFile
(26 lines) Feb 8, 2012 19:21
mongoimport very slow
September 15, 2011 03:22:38 PM
Hi all -- we're trying to import 3 million rows of test data in to mongo (1.8.2). Each line in the JSON fie looks very simliar to this: { "_id" : { "$oid" : "4e711ac4d413190fcc0000c2" }, "popularids" : [], "listing_ids" : [], "email_optin" : true,…
csv mongoimport issues
April 28, 2011 07:22:11 AM
on a 32 bit windows xp machine, i used excel 2007 to save a 60,000 line file in csv format. i used mongoimport for importing and get the message that 60,000 records have been imported. however, when i go to view the first 10 lines using…
mongoimport --ignoreBlanks
April 14, 2011 06:22:09 PM
I have not verified whether or not ignoreBlanks works, however, when the blank field is in the beginning of the TSV or CSV the fields are not processed as expected. Seems that all leading tabs are trimmed before processing begins.
mongoimport csv and boolean values?
November 15, 2011 02:49:25 PM
How can I import boolean values in a .csv file when using mongoimport? It always converts them to strings (e.g., false becomes "false", etc.). Thanks!
MongoImport vs Chunk Moving
January 25, 2011 11:57:30 AM
I have about 60MM records that I need to shard. I have a couple questions about this, - Is it better to shard the database so I have 10-20 Mongods running on the same server or to spread it out across several servers? - Moving chunks (well, inline…
Mongoimport and full stop
February 25, 2011 10:32:10 AM
Hello I am having a problem using mongoimport when the data value is a full stop. It appears the full stop "." is translated to 0 during the insert Example file "name","value" "Hello","." Import command mongoimport --db test --collection dottest…
How to improve the performance of mongoimport
February 27, 2011 12:18:34 PM
We have about 5 billion documents need to insert into mongodb. In our test. we import 50,000,000 documents in each time. but the performance of mongoimport degrade too fast and unstable. When we use 8 shards (mongodb cluster,each shard has 64G…
mongoimport data from mongoexport
April 25, 2011 10:37:02 AM
Hi - i'm getting the following error when i mongoimport data that i just mongoexport: 212100 629/second 2875990908/3700331240 77% 216000 635/second …
Re: Mongoimport error message
June 17, 2011 03:44:36 PM
Hello all. I am a newbie and still trying to import a csv file into mongodb. Here is the command from mongo shell: mongoimport --h localhost -d test -c foo --type csv --file /home/ robert/test.csv --headerline I keep getting SyntaxError:…
Problem with mongoimport from CSV file.
September 23, 2011 07:47:07 AM
I have a weird problem with mongoimport for specific CSV file. mongo version is 1.8.1 Command to import is mongoimport -u mongoUser -p 'pwd' -c usr_payments export.csv --type csv --stopOnError --upsert -f…
Have a problem with mongoimport i can't figure out.
January 20, 2011 07:01:02 PM
I try to import a big json file, but it doesn't work. The first time he gave me thousand error messages and inserted nothing. It is surely a valid json-file but this happens: xxxxxx$ mongoimport -h localhost -d ab -c cd --stopOnError -vvvvv…
Getting --upsert to work with mongoimport?
January 14, 2011 02:02:42 PM
I ran mongoimport with upsert, but it didn't replace entries as it went along. I did the following: ./mongodb-linux-x86_64-1.6.5/bin/mongoimport --upsert -d testdb -c testcol import.txt I can see in the mongod logs it complaining about unique…
mongoimport csv parsing errors
January 12, 2011 01:29:53 PM
MongoDB 1.6.5 on Ubuntu 10.10 x86_64 (kernel 2.6.35-24-generic). My CSV file is n.csv (shortened version, 2 lines, 1st line is the header): "Symbol","Name","LastSale","MarketCap","IPOyear","Sector","industry"," Summary Quote", "FLWS","1-800…
mongoimport csv parsing errors
January 12, 2011 11:36:29 AM
My CSV file is n.csv (shortened version, 2 lines): "Symbol","Name","LastSale","MarketCap","IPOyear","Sector","industry"," Summary Quote", "FLWS","1-800 FLOWERS.COM, Inc.","2.48","67265040","1999","Consumer Services","Other Specialty…
mongoimport effects on querying
August 10, 2010 05:21:15 PM
Does anyone know what effect running mongoimport with the --drop option has on running queries on the same collection?
mongoimport very slow ? send() vs sendto() ?
May 10, 2011 05:36:53 PM
we are observing some weird behavior in mongoimport for some files (I think really for some connections, since each imported file opens a new connection ), the import is really slow. normally for our data, we observer 1000--3000 records/second…
MongoImport Upsert Deletes Fields?
August 24, 2010 04:19:59 PM
It seems like mongoimport --upsert deletes fields not mentioned in the json I'm importing. E.g., if my collection is: { "_id" : 1, "name" : "Joe", "dob" : "2001-01-01" } and I upsert { "_id" : 1, name "Joe's new Name" } the field "dob" is…
problem with mongoimport and database references
April 18, 2011 11:21:23 AM
hello, i think i have some problem with mongoimport when json contains database references. as far as i can see in the documentation, my json should be well-formed, when db references look like the following: ... { …
Adding extra attributes with mongoimport
August 29, 2011 10:10:19 AM
I have many data sets (with a corresponding discriminator value) that I want to eventually push through some map-reduce analysis limited to documents with the corresponding discriminator value. Data sets come from several TSV import files, and…
ANN] Tool to help import databases with mongoimport
February 23, 2011 11:03:28 AM
I released a collection of scripts to simplify importing database tables with mongoimport. Perhaps others will find it useful. Overview: Using mongoimport to import all the tables of a relational database into MongoDB can be a bit tedious if you…
How to use mongoimport to import csv
January 13, 2011
Trying to import a CSV with contact information: Name,Address,City,State,ZIP Jane Doe,123 Main St,Whereverville,CA,90210 John Doe,555 Broadway…
MongoDB mongoimport upsert
February 6, 2011
I'm trying to do a bulk update with the following mongoimport -d my_db -c db_collection -upsertFields email ~/Desktop/update_list.csv the csv that…
How to mongoimport import by parts (big file)
March 7, 2011
How to import big file using mongoimport by parts if I import the file all at once, in the middle of 50% of completion, mongodb will crash because…
Importing Date-datatype using mongoimport
June 25, 2011
I have many GB of data stored in PostgreSQL database and i need those to be imported into the MongoDB. I did this using CSV export and mongoimport.…
Mongoimport get error: Failure parsing JSON
June 19, 2011
I get Assertion: 10340:Failure parsing JSON string near: [ running this command : $ curl https://api.github.com/users/lgs/repos | mongoimport -h…