添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

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

col_a,col_b
test,""

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?

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: