Error importing numerics in CSV file

I am trying to import a CSV file into a table within the Retool Database. My CSV has some numeric columns: a year (simple integer, e.g. 2023) and three currency fields, which are represented in the CSV as simple decimal numbers (19.99). I have two booleans, represented by values TRUE and FALSE. And I have various text fields, which in the CSV are unquoted.

The import wizard keeps kicking out various errors, e.g. Invalid input syntax for type boolean: "". I could not find documentation on the supported CSV formatting for the various data types, and experimenting with various fixes is getting nowhere. The sample CSV in the online help does not cover all data types (no booleans, for example). Can someone point me to info on this?

This is an existing table and you're using Import CSV -> Into current table? I can reproduce the same error when I try to import


where col_a is text and col_b is bool.

Have you tried importing a subset of the data? Like 1 row of ideal data. It's possible you have 1 or more malformed rows.

Matt, thanks. I was finally able to import the CSV by creating a new table from it vs importing to an existing table. With the new table method it didn't complain about any of the data at all, including the booleans, which it imported correctly. The column datatypes created were the same as mine, with a few small exceptions. Hmm.

To me this would seem to be an inconsistency in the two wizards. Perhaps their underlying code is different?

A suggestion for retool eng would be to expand the error message to include the offending line number of the csv. You can see the API call in dev tools Network tab, but it doesn't seem to contain any additional info that could be used to troubleshoot the issue.

That would certainly have saved me some time trying to run this to ground. The error messages were not helpful, other than noting the offending data type.

Also, a character index into the CSV indicating where the error occurred is WAY less useful than a CSV row number Who wants to count characters? Life is too short. :slight_smile:

I had a similar error when importing boolean values from a CSV and it was due to a few rows having null values (no values). Fixed by correcting my dataset