Import with relation

I have two tables: Countries and Regions. Regions have a one to one relationship with Countries. I’ve imported the Countries from a csv file. That’s fine. Now I need to import the Regions but I don’t know the Country objectIds. So I figured I would do the creation one entry at a time via the javascript API. My first step was to retrieve all of the Countries but I can’t seem to load all 246 at once. Max 100.

What’s the best way to import 2000 records with a relation to another table? I suppose I could export the Countries table and build the data externally, then import via a csv.

You can retrieve 100 at a time. Using paging, it would take 20 requests to load all 2000. I believe the simplest approach would be to build the relations at the CSV level and then import both files at once. The format describing relations is in the docs:

https://backendless.com/documentation/manage/mgmt_import.htm

Regards,
Mark