Parse Dashboard
Core
Importing CSV File
8 min
introduction importing csv files allow users to import data easily into parse tables prerequisites to begin with this tutorial, you will need an app created at back4app see the create new app tutorial to learn how to create an app at back4app 1 create a new back4app app first of all, it’s necessary to make sure that you have an existing app created at back4app however, if you are a new user, you can check this tutorial https //www back4app com/docs/get started/new parse app to learn how to create one 2 create a class for importing data in your newly created app, go to the database browser and click the create a class button choose to create a custom class and give it a name i called mine testclass but you can call yours anything you like remember that by convention classes start with an uppercase letter, are camelcase and does not contain special characters such as spaces and symbols click create class when you’re done 3 creating the csv file the csv file must be in the correct format in order to be imported correct format parameters separation character must be a comma , and not a semicolon ; adjust your spreadsheet software to output commas as separation characters first line will be the column names parse will automatically convert strings , numbers and booleans dates must have two columns date typespecifies the date type, date isospecifies the date format geopoints must have three columns columnname typespecifies the geopoint type, columnname latitudespecifies the latitude, columnname longitudespecifies the longitude arrays are passed in double quotes pointers require three columns columnname typespecifies the pointer type, columnname classnamespecifies the target class, columnname objectidspecifies the objectid of the target class so, for your reference, a few examples three columns columnstringa will hold strings, columnstringb will also hold strings, columnnumberc will hold numbers columnstringa,columnstringb,columnnumberc stringa,stringb,12 stringa2,stringb2,13 two columns columnstringa will hold strings, columnbooleanb will hold booleans columnstringa,columnbooleanb stringa,true stringa2,false two columns columnstringa and columnstringb will hold strings, columnarrayc will hold arrays columnstringa,colmnstringb,columnarrayc "stringa, with, commas",stringb, "\[1,2,3]" stringa2,"stringb, with, commas", "\["a", "b", "c"]" two columns columnstringa will hold strings, second column will hold a date in the iso format columnstringa, date type , date iso stringa,date,2020 01 16 stringa2,date,2020 01 17 two columns columnstringa will hold strings, second column will hold a geopoint columnstringa, geo type , geo latitude , geo longitude stringa,geopoint,1,2 stringa2,geopoint, 5, 6 you can find a sample csv file for download here download it here https //www back4app com/docs/assets/downloads/samplecsvfile csv for pointers, please check the example below one column holding a pointer team type ,team classname,team objectid pointer,team,xwdsm4xxq8 pointer,team,cd9naldaeg pointer,team,krgjpuzyxd in this example, please consider that objectid correspond to the existing ones at the team class check the sample csv file for download download it here https //www back4app com/docs/assets/downloads/import pointer csv csv 4 importing the data with your newly created class selected in the database browser, on the top right corner of the screen, click the notes button and select import data click the upload a file button, choose your csv file and click the import button 5 wait for an email confirmation as csv files can get quite big, an asynchronous operation is fired to import your data in background, which means you will not see any progress of importing nor success message at the end of the operation you will receive an email message either telling the operation was successful and your data was imported, or telling the operation wasn’t successful and explaining which columns/lines failed if you try to refresh your dashboard before receiving this email, you might see missing data or even no data at all, as the operation is still ongoing once you get the email and if your import was successful, we recommend hard refreshing your browser (cmd + shift + r on a mac, ctrl + shift + r in windows, both for chrome) to ensure the new schemas are retrieved and your data displays properly