Problem importing some relationships

Hey guys, I’m trying to import a relatively big amount of data and for some reason, some relationships are stored and some are not. The import log doesn’t give any errors.
111:54:32 IMPORT_DATA Importing Started.
211:54:35 IMPORT_DATA Start import table: Users
311:54:39 IMPORT_DATA Table ‘Users’ was imported at 4 seconds
411:54:39 IMPORT_DATA Finish import table: Users
511:54:39 IMPORT_DATA Start import table: Item
611:54:40 IMPORT_DATA Table ‘Item’ was imported at 0 seconds
711:54:40 IMPORT_DATA Finish import table: Item
811:54:40 IMPORT_DATA Start import table: TransactionLine
911:54:43 IMPORT_DATA Table ‘TransactionLine’ was imported at 2 seconds
1011:54:43 IMPORT_DATA Finish import table: TransactionLine
1111:54:43 IMPORT_DATA Start import table: WalletMovement
1211:54:45 IMPORT_DATA Table ‘WalletMovement’ was imported at 1 seconds
1311:54:45 IMPORT_DATA Finish import table: WalletMovement
1411:54:45 IMPORT_DATA Start import table: Shop
1511:54:45 IMPORT_DATA Table ‘Shop’ was imported at 0 seconds
1611:54:45 IMPORT_DATA Finish import table: Shop
1711:54:45 IMPORT_DATA Start import table: Account
1811:54:45 IMPORT_DATA Table ‘Account’ was imported at 0 seconds
1911:54:45 IMPORT_DATA Finish import table: Account
2011:54:46 IMPORT_DATA Start import table: Menu
2111:54:46 IMPORT_DATA Table ‘Menu’ was imported at 0 seconds
2211:54:46 IMPORT_DATA Finish import table: Menu
2311:54:46 IMPORT_DATA Start import table: MenuLine
2411:54:47 IMPORT_DATA Table ‘MenuLine’ was imported at 0 seconds
2511:54:47 IMPORT_DATA Finish import table: MenuLine
2611:54:47 IMPORT_DATA Start import table: Transaction
2711:54:48 IMPORT_DATA Table ‘Transaction’ was imported at 1 seconds
2811:54:48 IMPORT_DATA Finish import table: Transaction
2911:54:49 IMPORT_DATA Start import pointers for table: Item
3011:54:49 IMPORT_DATA Finished import of table: Item
3111:54:49 IMPORT_DATA Start import pointers for table: TransactionLine
3211:54:49 IMPORT_DATA Finished import of table: TransactionLine
3311:54:49 IMPORT_DATA Start import pointers for table: WalletMovement
3411:54:49 IMPORT_DATA Finished import of table: WalletMovement
3511:54:49 IMPORT_DATA Start import pointers for table: Shop
3611:54:49 IMPORT_DATA Finished import of table: Shop
3711:54:49 IMPORT_DATA Start import pointers for table: Account
3811:54:49 IMPORT_DATA Finished import of table: Account
3911:54:49 IMPORT_DATA Start import pointers for table: Menu
4011:54:49 IMPORT_DATA Finished import of table: Menu
4111:54:49 IMPORT_DATA Start import pointers for table: MenuLine
4211:54:49 IMPORT_DATA Finished import of table: MenuLine
4311:54:49 IMPORT_DATA Start import pointers for table: Transaction
4411:54:49 IMPORT_DATA Finished import of table: Transaction
4511:54:49 IMPORT_DATA Importing Finished.Can you help me figure out how to import all my relationships? For example here, no relationship between Account and Transaction seem to be imported at all. But in the import file, there are many! (I can provide the ZIP file in PM)Thanks guys :slight_smile:

Hi Guillaume,

Could you check (by looking at the timestamps) if the import process takes more (or about) 30 minutes of time?

Regards,
Mark

Hey Mark, not sure where to look for the timestamps? For info, after i upload the zip file, I receive "Backendless finished import your data successfully " email in about a minute or less. So much much less than 30 minutes imo

ok, please upload the zip to either dropbox or google drive and email the link for the file to support@backendless.com.

As for the timestamps, they are shown on every line in the import log. For instance, here they are 11:54:32 and 11:54:35

11:54:32 IMPORT_DATA Importing Started.
11:54:35 IMPORT_DATA Start import table: Users

Hey Mark, I just did. Please let me know if you need extra info. Thanks !

I just tried importing the data into a newly created app and I can see all the relations. Could you please try the same?

Ok so I just tried with a fresh app. In the Transaction table for example, the Account relationships are not saved. Do you see them?

No, I do not see them and it is for the reason that the CSV files do not contain valid relationships. For example, take a look at Transaction.csv. In the file, you will see the following column:

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px ‘Lucida Grande’}

account__Account__bcklsFK__ONE_TO_ONE

The column references objectId from Account.csv. None of the objectId values from account__Account__bcklsFK__ONE_TO_ONE are present in Account.csv

Hope this helps.

Mark

Thanks for helping Mark. I think i’m a bit confused. Shouldn’t the column account__Account__bcklsFK__ONE_TO_ONE refer to the column objectId of the Account table?

For example, on this Transaction: (objectId 05tB5zeVId)
the column account__Account__bcklsFK__ONE_TO_ONE contains: aqFKQ9L3XN. This objectId also exists in the Account table. Shouldn’t there be a relationship created here?

As as comparison, this same transaction has the column walletMovement__WalletMovement__bcklsFK__ONE_TO_ONE
that contains 756B1DGWYC. This is the objectId of one WalletMovement object, and the relationship is created propely.

Is there something i’m missing?

Thanks!
Guillaume

Hi Guillaume,

Yes, you’re correct, I missed that relation in the source files. It does look like a bug and we will need more time to investigate it.

Also, just to make sure I understand how you got there, I see the data was imported into Backendless from Parse and then exported from Backendless. Is that correct?

Regards,
Mark

Hey, not really . The data does comes from parse but there was quite a lot of work done on the files because we want to change the structure of the database. (rename fields, ect.)

So my workflow was: create the tables on backendless website > export all the tables > only keep the fields > add the info exported from parse manually. and then that gives me a csv file that should conform to backendless imports. I’ve tried importing them seperately and in one zip file. I always have these relationship issues.

Please let me know if you need more.
thanks a lot!

Guillaume

Are you aware of any other columns where the relations are missing?

Yes, for example each transaction should have one shop. the relations are not there. each transactionline should have one transaction. not there either. each walletmovement should have one user. same.

but what’s strange is, some relationships work perfectly. For example each shop has one currentMenu, and i see that all the relationships are imported properly. same for item, each item has one shop and all the relations are imported correctly

so it seems to me, most errors seem to occur within these 3 tables: trasnaction / transactionline / walletmovement

Hi Guillaume,
I created the internal ticket (BKNDLSS-13596) to resolve your problem.
We’ll let you know when it’ll be fixed.
Regards, Ilya

Thanks Ilya. Looking forwards to it!

Hey guys, did you manage to make some progress on this issue? Alternatively, is there a different way I could try importing this data? Thanks !

Hi all, could you please let me know a bit about the state of this issue? Is there any chance it could be resolved in the coming days? Otherwise, do you have any suggestion at all?

Is there an alternative way to populate the database that exsits?

Thanks!