Import / Export

File format

The import / export process supports the following formats: For CSV, the following applies:

Import options

The following options are supported: Additionally the CSV format supports the following options: The template document can be used to model the document more precisely with nesting and advanced types. Each value in the document should contain either: Following are the available types: For example the following CSV lines can be imported with no options:
Name,Address,City,State,Score
"Jane Doe","123 Main St","Whereverville","CA",9.5
"Jimmy Gil","555 Broadway Ave","New York","NY",3.4
You can use a template to import the same lines but with non-quoted strings:
Name,Address,City,State,Score
Jane Doe,123 Main St,Whereverville,CA,9.5
Jimmy Gil,555 Broadway Ave,New York,NY,3.4
    
The template would be:
{ name: "$Name/String", addr: "$Address/String", city: "$City/String", state: "$State/String", score: "$Score" }
    
Here is a more complex example of CSV data:
Number,Gender,GivenName,MiddleInitial,Surname,StreetAddress,City,State,ZipCode,Country,EmailAddress,Username,Password,TelephoneNumber,MothersMaiden,Birthday,CCType,CCNumber,CVV2,CCExpires,NationalID,UPS,Occupation,Company,Vehicle,Domain,BloodType,Pounds,Kilograms,FeetInches,Centimeters,GUID,Latitude,Longitude,LastUpdated
1,male,Anthony,J,Dacosta,2600 Rafe Lane,Jackson,MS,39201,US,AnthonyJDacosta@pookmail.com,Thadern,Wuithaiph7,662-718-2255,Whalen,3/25/1970,Visa,4485519808748821,260,6/2014,587-03-9892,1Z 9A9 W98 38 3679 711 2,Economist,Parade of Shoes,2003 Mitsubishi Montero,SanFranciscoAgency.com,B+,214.5,97.5,5' 9",175,0bbc614d-c665-4b4c-b566-2b08e5ffa9c7,32.368619,-90.183518,1378503941138
2,male,Jason,L,Saltsman,2729 Robinson Lane,Delaware,OH,43015,US,JasonLSaltsman@spambob.com,Witelf,phoo7kee0Yo,740-368-9998,Allen,8/6/1933,Visa,4716889560316146,737,1/2017,302-64-2796,1Z 765 372 96 5450 656 8,Technician,Druther's,1996 Toyota Cresta,ThousandPalm.com,O+,182.6,83.0,5' 6",167,8028febb-e027-4028-b27c-7e586279f7d8,40.294155,-83.002662,1378503962391
For this data we can use the following template that uses advanced types:
{
    "firstName": "$GivenName/String",
    "lastName": "$Surname/String",
    "gender": "$Gender/String",
    "address": {
        "streetAddress": "$StreetAddress/String",
        "city": "$City/String",
        "state": "$State/String",
        "zip": "$ZipCode/Integer"
    },
    "dateOfBirth": "$Birthday/String",
    "location": [
        "$Longitude/Double",
        "$Latitude/Double"
    ],
    "lastUpdated": "$LastUpdated/Date",
    "static": "UMongo rocks!",
    "static2": 1234
}

Export options

The following options are supported: Additionally the CSV format supports the following options: