App Engine: Can I upload my local dev_appserver.datastore to the live datastore? - google-app-engine

I've been reading about the remote_api and the bulkloader.yaml configuration file for doing bulk uploads of Google App Engine, but all I really want to do is replace my live datastore on the cloud with the contents of my local datastore. From what I've read, it would seem that I have to first somehow convert my dev_appserver.datastore file into csv or xml, and then apply all the fancy transforms of bulkloader.yaml, which seems like a lot of unnecessary work.
Anyone know if there's an easier way?
Thanks!

It might work to run download_data against localhost and then upload_data, using that dump, against your live app... does it?

Related

Trying to upload a file into google app engine using Blob

I am trying to upload the file into google app engine from where I would like to retrieve it and then perform conversion into a pdf file. I want to have a cloud access so I am deploying this project. But I dont the best way to go about it. Can anyone help please ? Or is there any solution to directly convert the file while being on the server ?
I don't think there are any ways to convert a file directly on the server. But to store and retrieve, you might want to take a look into the Google Cloud Storage client library (and the one from Python, if needed).
These might help as well (Java and Python). From there you can easily save a file, then retrieve it. Once you retrieve it, do your conversion to pdf and voila!

How can import a .sql file in app engine datastore

I m experimenting with GAE, and I m looking for a way to import an .sql file in app engine datastore. I found on GAE site ways to import CSV ans xml files:
https://developers.google.com/appengine/docs/python/tools/uploadingdata
but nothing about .sql.
I ve also came across the so called "jiqlAdmin Data Querying tool" that claims to import .sql files in google `s datastores:
https://groups.google.com/forum/?fromgroups=#!topic/google-appengine-java/Sfy3jmWhYfI
Anybody has tried tool this? Does it work? Do you have any other suggestion?
Thnx
If the goal is just using SQL with App Engine, I would check out Google Cloud SQL, which works great with App Engine.
If you just want your data in the datastore, converting it to CSV and uploading it as per the first link might be a good choice. This will not work if you have things like foreign keys as they will refer to IDs in your old SQL database. You also probably won't be happy with your data if it's arranged in such a way that using a JOIN is the only way to make sense of it.
Since it sounds like you are just getting started, I think Google Cloud SQL is the better option.

Move database from local datastore to another local datastore

I and my friend are working on a GWT-Google App Engine project, using Tortoise SVN and Google Code to synchronize the code.
We also synchronize the local_db.bin file in appengine-generated folder. But we cant get it work. After synchronize the db file, our local datastore is not updated as we expected.
That is a pain. Im worrying about our future, when our database get bigger and more complicated #A#.
Anyone please give me an advice. What should i do to synchronize our local datastore?
I have to suggestions:
1) Use remote api : https://developers.google.com/appengine/articles/remote_api to share a GAE hosted db locally.
2) Maybe you can use Gdrive to sync folders.
This is a really bad idea. Even if you weren't having trouble making both ends read from the same datastore file, the local datastore is in a binary format, and thus you won't both be able to work on the app at the same time, or you'll get merge conflicts you will be unable to resolve.
Instead, both for collaboration purposes and for testing and deployment, you should provide a set of test data you can easily load into the datastore. Store the test data in version control, and load it in using bulkloader or your own code.

Developing for Google App Engine and using the datastore

I am just getting started with Google Web Toolkit and Google App Engine and have a quick question. I think I understand how to use the datastore now but I was wondering if there is a way that I can quickly create a "database" with static data from an excel sheet? I just need to add some data for a proof of concept later this week.
I am picturing something similar to a SQL database browser where I can just import the data?
I developing in Eclipse with appropriate plugins.
Thanks,
Rob
The easiest way to do this would be to save your spreadsheet as a CSV file, then use the bulkloader to load it into the datastore.
Your best bet is probably to write something to handle uploading it, or to handle processing it on the server.
However, you should also look at the bulk loader. It might be able to save you a little bit of time.
Here is the API (Google Documents List API) that "allows client applications to programmatically access and manipulate user data stored with Google Documents".

Export from AppEngine database to the local development database?

Is there a way to export the data on my AppEngine database to the development server (for testing purposes etc.) ?
Yes! Check out Google's "Uploading and Downloading Data"
If you'd like to test how your data
works with the app before uploading
it, you can load it into the
development server. Use the --url
option to point the tool at the
development server URL. For example:
appcfg.py upload_data --config_file=album_loader.py --filename=album_data.csv --kind=Album --url=http://localhost:8080/remote_api <app-directory>
The subsection on uploading and downloading all data is also worth looking at.
Not yet it seems
Of course you can go pulling the data yourself, one batch at a time...
Yes we can download all data from google app engine and can upload to datastore but sometimes uploading data to local development server is painfull because of errors. App Engine SDK versioning diffrences occurs this like problems. For example i developed an app 1 year ago. Today, i want update it. I downloaded all data from Google App Engine real servers. But i can't upload its to local development server. You know, we using EntityLoader class for this operation. Entity Class importing db module, but SDK throws, "no module named by db".
I suggest for App Engine lovers that; save your first test data for future. Don't think that i will download all datum for testing future. Save your own test data with Sqlite support. And save your deveopment enviromenment version for future. SDK Version updating sometimes causing painfully times for developers

Resources