Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How smart is SQLite at detecting column types from Csv data?

I once wrote a Python script to load csv files into SQLite. It had a whole hierarchy of rules to determine the data type of each column.



It doesn't detect column types automatically-- they are imported as text. You can, however, use math functions on them and sqlite3 will dynamically convert where possible (e.g. "select number_1_stored_as_text + 1 from mytable" will output 2)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: