[web2py] Re: CSV import broken?

2011-01-30 Thread howesc
Forcing ID's in GAE is a bit harder, and i don't think that web2py has 
support for that yet.

also note that once the database gets to be of significant size the 
import/export features will have to be written to run as taskqueue tasks on 
GAE so that they can run for 10 minutes instead of 30 seconds for web based 
requests.

if you are only using GAE consider looking at the GAE bulk import/export 
tools.  they fix ID's, and can run on infinitely large datasets. 
http://code.google.com/appengine/docs/python/tools/uploadingdata.html


[web2py] Re: CSV import broken?

2011-01-29 Thread Massimo Di Pierro
When you import a single table

db.tableimport_from_csv_file

the Ids get reassigned.

If you export/import an entire database with

db.export_to_csv_file(...)/db.import_from_csv_file(...)

Ids are still re-assigned bit references are fixed.


On Jan 29, 4:17 pm, Emceha marcin.chojnow...@gmail.com wrote:
 Hi,

 I have app at GAE and I decided to export all the data and import on
 my devel machine.
 So let's say user table line looks like this (there is just one user):

 auth_user.id,auth_user.first_name,auth_user.last_name,auth_user.email,auth_ 
 user.password,auth_user.registration_key,auth_user.reset_password_key
 11001,First,Last,x...@site.com,pass,key,

 When I import this localy this user gets ID=1 (I would expect 11001)

 That way when I try to import other stuff the reference to this table
 get's broken as other data references to the user.is 11001 and it's
 now 1.

 I get the same problem with other referenced data.

 I consider this as a bug - as I think if we export/import I don't have
 to remap all ID's manually but ID should remain as they were in the
 old database - I'm sure ID's can be forced, can they?

 Marcin