We need to download data as a CSV from the app engine data store. This would help us get the data back from the app engine, just in case you want to move away or update from the data store.
We’ll go through a step by step example for using this tool with a Java application.
1. Download Google App Engine SDK for Python from here.
Unzip this file. Place it in your path. For Linux users.
2. Now you have to set remote servlet with our Java application with which would be able to communicate with the app engine remotely. The following needs to be set up in your web.xml
Deploy your application to the app engine.
3. Now we are going to use appcfg.py to generate a configuration file:
Once you execute this command, after the necessary authentication the following file is generated
4. It would create configuration for all entities. Replace these lines:
5. Now the next step is for downloading data.
It will asked to provide email and password credentials.
There’s now a CSV file named data.csv in our directory, with autogenerated bulkloader files.
Open CSV file in text mode. You can make changes in CSV file by using text editor.
6. Now for uploading data.
The bulkloader took care of generating a mostly-finished configuration file for us, in a format that ensures the data we download can be re-uploaded again without loss of fidelity.
3 thoughts on “Downloading And Uploading Data on Google App Engine Using Java Application4 min read”
In case of permission error at step 3, have a look to that post: http://stackoverflow.com/a/8026482/2566060
Is there anyway to download a selection of the data? eg like the GQL: “Select * from Contact where AdminID=1234”
My previous downloads suggest that I have done this, but I cannot figure out how!
Comments are closed.