2

I have a database in SQLite format in my local HD. I would like to get the database up to GAE so that I can use it to create certain cool web-apps. I have browsed around for a way to do it. However, mostly the projects available are to backup the database in GAE to my local HD. Is there an existing way to get the local Sqlite db up to GAE already?

Winston Chen
  • 6,799
  • 12
  • 52
  • 81

2 Answers2

4

There is no way that you can do it directly on appengine, as writing to a file is restricted in appengine . I would say, you should export your sqlite database file to some common format like csv , design the model similar to sqlite table schema. Then write a script to load all those sqlite records into dev_sever (development env included in sdk), Then you can easily upload the data from local developement server to google appengine. Have a look at this to know how to export development server data to appengine.

Community
  • 1
  • 1
Abdul Kader
  • 5,781
  • 4
  • 22
  • 40
  • what about I only wanna read a file, instead of writing. Can I wrap the sqlite or csv file in the project and deploy altogether? – Winston Chen Jun 16 '11 at 13:16
  • you cannot read from a file in app engine. You can consider storing the file as csv provided the file size is not larger than 1mb – Abdul Kader Jun 16 '11 at 16:12
1

You can do this with the Google Cloud Storage service (https://developers.google.com/storage/). Your application can read write to files stored in the Google cloud storage, so it is possible to put sqlite files there and read from and write to them.

jerryvig
  • 75
  • 1
  • 5
  • So, basically it's like a cloud sqlite DB up there in google, your GAE is able to connect in and execute SQL commands in the DB. Or it's just a regular static file read/write thing? – Winston Chen May 31 '12 at 00:23