mercredi 8 juillet 2015

Insert data from files into SQLite database

I have an SQLite database on this form:

Table1

Column1 | Column 2 | Column 3 | Column 4

I want to populate this database with data stored in some hundred .out files in this form, where every file has millions of rows:

value1;value2;value3;value4;
2value1;2value2;2value3;2value4;
... etc

Is there a fast way to populate the database with these data? One way would be to read in the data line for line in python and insert, however there probably should be a faster way to just input the whole file?

Bash, SQLite, Python preferrably

Aucun commentaire:

Enregistrer un commentaire