views:

26

answers:

1

I'm trying to bulkload data using appcfg.py as described here. I got it working except setting parent entity, I can't seem to find info on how to set a parent entity for entity being created by the import. Can you point me to the right direction or provide a code snippet for my bulkloader.Loader implementation?

+1  A: 

You need to override the generate_key method of your Loader class. See this post for details.

Nick Johnson
There is no example on how to set parent in that post :(
WooYek
Just return the key you want your entity to have from the generate_key function. You can construct it with, eg, db.Key.from_path('kind', 'name', parent=parent_key)
Nick Johnson