Struggling to Upload a CSV file to AppEngine Datastore

74 views
Skip to first unread message

Benjamin Mayo

unread,
Nov 16, 2009, 12:43:31 PM11/16/09
to Google App Engine
Bear with me here. I have never used python at the *commandline*
before. Ever.

I have a .CSV file containing the database I would like to upload to
my GAE datastore. I have followed the documentation provided, but the
python shell keeps returning errors (syntax: update_data). Please can
someone step me through how to import the CSV file into AppEngine.

Thankyou for any help you can give, which - I promise - is greatly
appreciated.

Greg Tracy

unread,
Nov 16, 2009, 2:47:16 PM11/16/09
to Google App Engine

what was the exact error or symptom? i'm reluctant to repeat the how-
to guide.

http://code.google.com/appengine/docs/python/tools/uploadingdata.html

i've uploaded bulk elements via csv multiple times and the
instructions worked perfectly. the sections you actually have to
implement are:

1. "setting up remote_api"
2. "creating loader classes"
3. "preparing your data"

then issue the following from the command line...

appcfg.py upload_data --config_file=<your loader script from step
2>.py --filename=<your CSV file>.csv --kind=<your db.Model class name>
<app-directory>


On Nov 16, 11:43 am, Benjamin Mayo <wondersofthebr...@googlemail.com>
wrote:

Benjamin Mayo

unread,
Nov 17, 2009, 1:20:34 PM11/17/09
to Google App Engine
The commandline reported SyntaxError: invalid syntax.

"i've uploaded bulk elements via csv multiple times and the
instructions worked perfectly."

I'm sure they did, and I am sure this is my error, not the docs.
Luckily, this does not apply personally anymore - I ended up doing
something different - but I would love a response anyway, for future
reference.

Greg Tracy

unread,
Nov 17, 2009, 3:12:31 PM11/17/09
to Google App Engine

i believe a syntax error refers to an invalid command line argument.
can you copy and paste the command with all its arguments here in this
thread?



On Nov 17, 12:20 pm, Benjamin Mayo <wondersofthebr...@googlemail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages