I'm working on a project where I need to migrate from Postgres to MongoDB. The issue is, I cannot save the entire Postgres database to memory. Also, unlike approaches taken here or here, this is not a one-time migration, so I can't copy the entire contents of the Postgres database as text on disk every time data is transferred between the databases.
I was wondering if there was some way to "stream" data, row by row, from Postgres into MongoDB--realy, frompsycopg2 to pymongo.
edit: I suppose I should make the question more specific; I'm asking whether there exists a python library that can stream data between SQL/NoSQL databases, preferably one that works well with psycopg2 and pymongo.
edit2 For those who plan on down-voting, could you leave a comment explaining why? I thought it was a pretty legitimate question.
insert into some_mongo_collection (...) select ... from postgresql_table where .... I haven't used it but worth a look.