Skip to content

Migrating data

From CSV to Postgres via sqlite3

1. Load the csv into sqlite3

sqlite3 mydb.sqlite3

1
.mode csv
2
.import my_csv.csv mytable

2. Use pgloader to transfer the data from sqlite to postgres

pgloader --type sqlite sqlite://mydb.sqlite3 postgresql:///app?host=/home/me/tmp/mydb