I'm trying to load a dump from a big postgresql database (>1GB) with sqlite3. This is my code:
# import package
import sqlite3
# load data
importpath = 'C:\directory\dump.sql'
con = sqlite3.connect(importpath)
f = open(importpath,'r')
sql = f.read()
cur.executescript(sql)
I keep getting a very unspecific error. It just says "MemoryError:" with an arrow pointing on "sql = f.read()". I guess it is some sort of problem with insufficient memory for all the data but I really can't tell. Any advice to fix that? I just need to get the data into a local database where I can access it from Python. Unfortunately it's not an option to use a separate local database application since I'm stuck with what is already installed.