I understand will be able to import .csv file right into a pre-existing table inside a sqlite database through:
.import filename.csv tablename
However, can there be such method/library that may instantly produce the table (and it is schema), to ensure that I do not have to by hand define: column1 = string, column2 = int ....etc.
Or, maybe we are able to import everything as string. To my limited understanding, sqlite3 appears to deal with all fields as string anyway?
Edit: What they are called of every column isn't essential here (assume we are able to have that data in the first row within the CSV file, or they may be arbitrary names) The bottom line is to identify the worthiness kinds of each column.
You stated yourself within the comment that it is a nontrivial problem to look for the kinds of posts. (Make a million rows that seem like amounts, only one of individuals rows includes a Z inside it. - Since row needs to be typed "string".)
Though non-trivial, it is also pretty easy to obtain the 90% scenario working. I'd just write just a little Python script to get this done. Python has a really nice library for parsing CSV files and it is interface to sqlite is straightforward enough.
Just load the CSV, guess and appearance in the column types. Devise a
create table that encapsulates these details, then emit your
insert intos. I can not picture this trying out a lot more than 20 lines of Python.