0

relational database I need to import multiple csv files, over 100, into a sqlite database. I was told using Python to achieve this would be one of the simplest and most efficient ways to do this. These csv files are surveys that contain around 75 questions(rows) on them with answers from about 30 different people(columns). There may be some differences or added questions between the surveys.

I have searched and found examples of creating a database to import a single CSV file but couldn't find much on importing many.

Is python the way to go with creating a database to hold each of the surveys. I am not even sure where to begin with this as I have never used python or sqlite3 so any help is appreciated.

kevtops
  • 1
  • 2
  • Normally I'd suggest using the [command line shell's CSV import](https://www.sqlite.org/cli.html#csv_import) feature, but from that description you'll need to do some ETL work to get the data into the database with a reasonable design. So first step is to lay out your tables and how they're related. Are you familiar with relational database design at all? – Shawn Dec 09 '18 at 02:18
  • Possible duplicate of [Importing a CSV file into a sqlite3 database table using Python](https://stackoverflow.com/questions/2887878/importing-a-csv-file-into-a-sqlite3-database-table-using-python) – Lie Ryan Dec 09 '18 at 02:22
  • Thank you @Shawn I added the relational database that I created for the project. I really think I am overthinking this project. I actually attempted to use the code or similar code to what Lie Ryan posted prior to asking my question but couldn't get anything going. – kevtops Dec 09 '18 at 02:59

0 Answers0