pls try "copy" in postgres.
KM
On Mon, Jul 25, 2011 at 7:46 PM, Josh wrote:
> pgloader is for Postgres I think. If it has to be to a single table it
> shouldn't be that difficult in Python:
>
>
> 1) get sqlalchemy and declare the django-table. You can use
>
Wow, these are great.
I was thinking about having to write something much more basic, now I
have something to learn from. Thanks for sharing!
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
pgloader is for Postgres I think. If it has to be to a single table it
shouldn't be that difficult in Python:
1) get sqlalchemy and declare the django-table. You can use
SQLAutocode for this.
2) import and parse the csv-file ( import csv )
3) use the parsed csv as input for sqlalchemy and add
This hasn't been tested, but so far I really like what I wrote:
http://dpaste.com/hold/577295/
http://dpaste.com/hold/577299/
The code might be missing a few imports, as I copy-pasted and removed a few
tidbits for the sake of simplicity. I'm thinking of packaging into an app
one of these days,
Using copy_from is easy to solve it. And if you want to a get a speical
format file from that csv, use a scirpt to handle it.
http://www.initd.org/psycopg/docs/cursor.html#cursor.copy_from
2011/7/25 nixlists
> On Sun, Jul 24, 2011 at 2:46 PM, Jarilyn Hernandez
>
On Sun, Jul 24, 2011 at 2:46 PM, Jarilyn Hernandez
wrote:
> Hi, Thanks for the response. My problem is that I have my tables created on
> django. All I want is to import some data from a csv file to these tables
I am using HeidiSQL with MySQL for this, but a script
On 07/24/2011 02:46 PM, Jarilyn Hernandez wrote:
Hi, Thanks for the response. My problem is that I have my tables
created on django. All I want is to import some data from a csv file
to these tables. I tried to search on the archives of the mailing list
but I can't find what I need. I heard
Hi, Thanks for the response. My problem is that I have my tables created on
django. All I want is to import some data from a csv file to these tables. I
tried to search on the archives of the mailing list but I can't find what I
need. I heard that batchadmin can help me to solve this. I
hi,
you can use python script to upload from csv file to database.
if u r using mysql u can http://sourceforge.net/projects/mysql-python/
download and install this package and use csv reader to read from file
and write it on to tables. Guide(http://www.kitebird.com/articles/
pydbapi.html).
if
Please search the archive of this list. This exact thing has been addressed
in detail.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send
Greetings,
I'm a newbie in databases, and I was wondering if there is possible to
insert data from a csv file into one of the tables of my database. I
heard that you can use a tool called pgloader, but I don't know how to
use this tool or if it is possible to do this with django. Does anyone
11 matches
Mail list logo