Reputation: 901
I have a simple application which uses a database of products. I created the app and there are no entities with the kind "Product" as it is a new db.
Following the guidelines for uploading data, I created a bulkloader.yaml. However, this config fiel has no properties or anything that describes my "kind".
Is there a way in which I can upload data into an empty database using the bulkloader.yaml without resorting to writing a custom loader?
Thanks
Upvotes: 1
Views: 245
Reputation: 16141
You can create a single entity in the datastore, generate your bulkloader.yaml, and then delete the entity.
For example, somewhere in your code have:
p = models.Product.all().fetch(1)
if not p:
p = models.Product()
p.foo = 'delete_me_later'
p.save()
Then upload your project and make a call that hits that code. Then generate your bulkloader.yaml file. Finally delete the code and the object using the app engine Data Viewer.
However, even though the autogeneration feature of bulkloader.yaml is nice, you will almost certainly need to tweak it if your data is even moderately complex. I would not use the autogeneration feature as an excuse to not learn the bulkloader file format.
Upvotes: 1