Support Topics Documentation Slack YouTube Blog

Problems with Importing CSV data

I am having a number of problems with importing CSV data:

  1. Sometimes when I select a file to import it just hangs. The file is imported into Files, but it does not present the next screen to match the data types.
  2. Even when I have an existing table and have disabled dynamic schema definition, the import changes the format of all STRING columns to 500 and adds columns, rather then generating an error.
  3. If I add the type definition in the column names, I get an invalid file format error after selecting a file, so this does not appear to be a workaround for the above issue.
  4. After accidentally trying to import a column called invoiceId when the matching column in the database is called invoice, when I try and change the invoice column name to invoiceid I get a duplicate column error even though the column doesn’t apear in either the schema or the data browser.

Please attach your CSV to this topic so we can try duplicating each reported problem. If there are multiple CSVs (for instance one for each problem), please change the post to use a numeric list and provide the files for each issue. If you cannot attach the file(s) because of privacy issues, please upload them to the Files section of your app and send the links to the files to support@backendless.com.

Regards,
Mark

App ID is: 95594B0A-1972-7690-FF14-F883764C3B00

Point 1 above doesn’t happen reproducibly. If I can see a pattern I will report it again.

To illustrate point 2, I just created a table called Test1 with columns string1 (STRING 30) and string2 (string 250). After importing the following file with two rows in it:
Test1.csv (40 Bytes)
both columns are showing “STRING | MAX LENGTH: 500”

For point 3, f I try to import the same file with data type definitions as follows:
Test1.csv (64 Bytes)
I get the following error: “An error occurred. Invalid file.”

As an example of 4, I tried to import data into a table called Patient_old (this failed. I’m assuming it’s my fault for the moment). An additional column was entered into the schema called referring_doctor by the import process. Now when I try and delete it I get the following error: “Can’t DROP ‘referring_doctor’; check that column/key exists”

I will try to get some simple, reproducible examples using my actual data too, but unfortunately I have been changing things around as I have been experimenting today…

And running the Test1 import again with another column added to the csv adds a new column even with dynamic schema definition disabled.

Test1.csv (58 Bytes)

In this example I imported the following file with no schema definition. It created some of the columns in the schema (but not all) and imported all of the rows.

InvoiceItem.csv (95.0 KB)

Hello @Andrew_Schox

I apologize for the long wait. Our team is currently investigating this issue. I will write to you about the results as soon as possible.

Regards