Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to download all datastore entities on Google App Engine?

I've read the GAE docs, and I can't seem to figure out how to download all my entity data.

What I'd love to do is download the whole thing as a big TSV file (or something I can easily munge into one), so I can import my various entities into a spreadsheet and fiddle with them.

But I'm stuck at the starting gate. I don't understand the first few bits of the docs: "This document applies to apps that use the master/slave datastore. If your app uses the High Replication datastore..." -- I'm not even sure which I have, or how I would tell.

Assuming I have the simpler master/slave, the docs continue: "...you can use the Python appcfg.py tool by installing the Java version of the remote_api handler..." but, again, I'm not quite sure what they mean or where I find this appcfg.py tool.

Sorry for such a n00b question, but is there some sort of walk-through? I just want to download my datastore!

Thanks!

like image 937
Olie Avatar asked May 26 '11 05:05

Olie


People also ask

How do I add entities to Google Datastore?

In Java, you create a new entity by constructing an instance of class Entity , supplying the entity's kind as an argument to the Entity() constructor. After populating the entity's properties if necessary, you save it to the datastore by passing it as an argument to the DatastoreService. put() method.


2 Answers

Master/Slave is the default (for now), so that's almost certainly what you're using. You can confirm at https://appengine.google.com/ -> app-id -> Administration -> Application Settings -> Datastore Replication Options.

To download your data, first install Remote API for Java, then use appcfg.py to download data:

appcfg.py download_data --application=<app-id> --url=http://<appname>.appspot.com/[remote_api_path] --filename=<data-filename>
like image 74
Drew Sears Avatar answered Nov 11 '22 06:11

Drew Sears


There is nothing you need to do other than just follwiong the google's own documentaion. There is no workaround or walkthrough. I am not sure about java. In python , only thing you need to do is enable remote_api in your app.yaml.

appcfg.py can be found inside the root directory of appengine SDK.

like image 40
Abdul Kader Avatar answered Nov 11 '22 08:11

Abdul Kader