Found this thread : http://groups.google.com/group/google-appengine/browse_thread/thread/59782fc263892c56/6db72b434a829776?lnk=gst&q=java+erase+datastore#6db72b434a829776
It confirms there is no easy solution to bulk delete entities. May be it could be added to the bulkloader ? On 12 sep, 19:38, Francois Masurel <[email protected]> wrote: > Hi Tim, > > Your solution seems to be interesting. > > You say that I don't need to deploy anything as long as remote_api is > enabled and we can just use the console to do our deletes. > > Could you explain a bit more how you do that ? My app is written in > java. > > Thanx again. > > On 12 sep, 13:20, Tim Hoffman <[email protected]> wrote: > > > > > Hi > > > There is no need to use the mapper api for that small number of > > entities > > > Use the console and remote api. It will only take a few minutes > > runtime. And the advantage is you don't have to deploy anything as > > long > > as you have remote_api handler already registered. > > > The do a GQL query of GQL.query("select __key__") > > > then with a cursor, do a series of fetches of keys followed by > > deletes. > > > For instance > > > def bulk_delete(kind=None): > > c=None > > q=None > > i = 0 > > if kind: > > q = kind.all(keys_only=True) > > else: > > q = db.GqlQuery("select __key__") > > > while True: > > > if c: > > q.with_cursor(c) > > keys = q.fetch(500) > > i = i+len(keys) > > if not keys: > > return i > > db.delete(keys) > > c = q.cursor() > > > See ya > > > T > > > T > > > On Sep 12, 4:09 pm, Francois Masurel <[email protected]> wrote: > > > > I just used the bulkloader to restore data from another GAE > > > application but sadly all string key references are erroneous (coz key > > > contains appid) and my restored entities are useless. > > > > Do I have to erase my 32000 entities manually or is there an easier > > > way to reset the datastore ? > > > > Thanx for your helpl. > > > > Francois -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
