Trying to import tables with data and relations

Hi,

I have 2 tables - retailers and prices which both have a field (retailerid) which is a 1:1 relation.

I have data in the retailers tables in Backendless and in the prices tables (1400 records) as a CSV. In order to import the prices data and maintain the relationship, I created the prices table in BE, created the relationship with retailerid field in the retailers table, exported it, copied my data from the CSV into the exported template and then imported it.

However, the retailerid field in the prices table is blank.

Is this the correct method?

Thanks
Steve

Hello @Steve,

To correctly provide relation data, try manually adding the relations to your tables first. After that, export all the tables, and you’ll be able to see the proper structure for defining the relations.

Let me know if you need any help with the process!

Hi,

I just retried with all 3 tables that have relationships - retailers, locations and prices.

The retailers and locations is fine as I had entered those manually before the export. The prices table was empty but has the relationship built to retailers.

Once again on import, even though there is data in the retailerid column in the CSV, on import the column in the table is empty.

Steve

@Steve

Thank you for bringing up the issue, and I’m sorry you’re experiencing difficulties. I’ve tested the scenario you described but couldn’t reproduce the problem.

So, could you please try exporting the data again, ensuring the CSV files are correctly formatted, and then compress them into a ZIP file before re-importing. To help you with the process, I’ve attached a sample ZIP file that you can import to see how it should work:
export_2025_02_13_12_06_47.zip (899 Bytes)

This file includes the TestPrices and TestRetailers tables with their relationships properly set up.

Let me know if you encounter any issues or need further assistance!

1 Like

Ok, Will try in a bit and let you know.

Thanks

Hi,

I tried the zip import but got the same result. You can view my procedure here.

Thanks
Steve

Hello @Steve,

Have you had a chance to import the ZIP file I provided? Was the import successful?

Hi,

Look above. I tried and it failed again. Video here.

APP ID is 3F28D17A-3D37-49DB-9CD1-806E4238D532.

Steve

Hello @Steve

Please take the template that Sergey sent you and don’t add any other columns. Try to import a few records (for example 3-5) to understand how it works and how you need to fill in the data. The template that Sergey sent you is working.

Regards,
Inna

Hi,

Finally got it done. For anyone else following this thread, please note that the link between fields in tables with relations is the object id and not an id that you may assign.

Also, when exporting related tables to populate with data, make sure to export all related tables, not just the ones which you may wish to populate.

Steve