Read from database, write to another database, simultaneously

Istvan Albert istvan.albert at gmail.com
Thu Jan 11 15:06:46 CET 2007


Sean Davis wrote:

> at the same time that the data is coming in?  So, I am actually looking
> for a solution to this problem that doesn't require an intermediate
> file and allows simultaneous reading and writing, with the caveat that
> the data cannot all be read into memory simultaneously, so will need to
> be buffered.

IMO the problem that you need to solve is not well suited for the
python DBAPI as this API is meant to support programming and
interacting with the database not streaming large quantities from one
database into another.

I agree with another opinion in this thread.

All you need is a simple way to pipe the output from Oracle into
Postgresql. Just run the oracle client and start dumping to the
standard output. Pipe it through sed (or a python program) to reformat
the output for whatever minor fixes (you might not even need this step)
then continue piping it right into psql.

i.




More information about the Python-list mailing list