Hello,
I am a big fan of PostgreSQL's excellent bulk loader
COPY. It can rapidly load a CSV file directly into the database, an oftentimes tedious task that I have to do frequently as part of my job.
I am not a big fan of having to write my COPY commands in raw SQL. I'd much rather use Django's ORM.
So last week I put together an app call
django-postgres-copy that attempts to integrate COPY into Django, modeling its design on the excellent
LayerMapping utility in contrib.gis, which I also use frequently.
I wrote a blog post about the approach here
You can find more complete technical documentation here
And all of the code is up here on GitHub
Since Django has already begun to integrate other PostgreSQL-specific features in contrib.postgres, I'm curious if the core developers are be interested in adding COPY support as well.
I'm not attached to the style of my library and I'd welcome a different approach if it got the job done. I'd be thrilled to have the opportunity to carry the torch and do whatever refactoring and additional coding is necessary to qualify it for a merge.
Please let me know what you think. And if I've overlooked some previous discussion or superior third-party library in this area, please forgive me. I searched around but was unable to find anything.
Sincerely,
Ben Welsh