Backendless Support
 

Assigning column types during data import

Backendless offers the feature for data import using CSV files which has already had the data type defined for each column. 

For example: 

With that approach the import process is completely automated since Backendless knows what the data type for each value is. However, what would happen if the imported CSV file(s) do not provide that information? Backendless handles that scenario rather gracefully - it provides a very easy-to-use interface where you can assign the proper data types. 

Consider the following data file:

OBJECTIDCREATEDUPDATEDCUISINENAMEOWNERID
277AA15C-E863-6307-FF86-D048F78E4B0001/17/2015 00:00:00 GMT+000001/21/2015 00:00:00 GMT+0000fastfoodMcDonald'snull
761AF742-567F-6C4A-FFA9-9A17138A0A0001/17/2015 00:00:00 GMT+000001/21/2015 00:00:00 GMT+0000italianBuca Di Beponull
834AA1E2-1B8C-46F0-FFA9-BD2742B6550002/19/2015 00:00:00 GMT+0000nullpizzeriaMister Catnull
E1118F7D-AF69-8630-FF53-4A3FD5A9090002/19/2015 00:00:00 GMT+0000nulljapaneseEvraziyanull
EB628266-A55A-E52A-FF1F-326D4E5D020001/17/2015 00:00:00 GMT+000001/21/2015 00:00:00 GMT+0000mexicanCantina Laredonull
FFE1C0BB-CFC6-738F-FFC1-7A8A66ED3A0001/15/2015 00:00:00 GMT+000001/21/2015 00:00:00 GMT+0000bakeryEndless Sweetsnull

As it is demonstrated be the table the header row has no information about the column types. 

When importing the file to Backendless using console (you can download the file from here), the file is uploaded and the user is then presented with the following interface: 

The example shows that for every user-defined column (columns objectId, created and updated are the system-level columns), the Console prompts the user to specify the data type. 

If a developer imports multiple CSVs, there would be a similar interface for each file without the data types. 

The interface is also aware of columns representing relations and provides a way to specify those. Once the types are set, click the Finalize Import button to finish the import.

Review related topic:

Is article helpful?