Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
clear *production* datastore
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
José Oliver Segura  
View profile  
(2 users)  More options Jun 30 2008, 4:32 pm
From: "José Oliver Segura" <primi...@gmail.com>
Date: Mon, 30 Jun 2008 22:32:20 +0200
Local: Mon, Jun 30 2008 4:32 pm
Subject: clear *production* datastore
hi all,

in order to do a quick performance test, I uploaded and tested a
little app creating around 2000 objects in the datastore, now I want
to remove them, ideally, without accessing the datastore viewer and
selecting page by page and pressing the "remove" button. Anybody knows
if it's possible to access some kind of "clear_datastore"
functionality via the web dashboard (I have not seen it) or via the
deployment client? I doubt it exists, but just in case...

Best,
Jose


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Canis  
View profile  
 More options Jun 30 2008, 6:11 pm
From: Canis <wooji.ju...@googlemail.com>
Date: Mon, 30 Jun 2008 15:11:34 -0700 (PDT)
Local: Mon, Jun 30 2008 6:11 pm
Subject: Re: clear *production* datastore
There's currently no simple way to do this (I wish there was).

However, you can use the bulk loader client also as a bulk deleter --
I wrote an article at http://www.wooji-juice.com/blog/appengine-bulkloader.html
explaining how. Note, it may not be fast or reliable (in my
experience, it was very slow and unreliable, but that may have been
due to other factors, eg indexing).

On Jun 30, 9:32 pm, "José Oliver Segura" <primi...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
José Oliver Segura  
View profile  
 More options Jul 1 2008, 5:07 am
From: "José Oliver Segura" <primi...@gmail.com>
Date: Tue, 1 Jul 2008 11:07:40 +0200
Local: Tues, Jul 1 2008 5:07 am
Subject: Re: [google-appengine] Re: clear *production* datastore

On Tue, Jul 1, 2008 at 12:11 AM, Canis <wooji.ju...@googlemail.com> wrote:

> There's currently no simple way to do this (I wish there was).

> However, you can use the bulk loader client also as a bulk deleter --
> I wrote an article at http://www.wooji-juice.com/blog/appengine-bulkloader.html
> explaining how. Note, it may not be fast or reliable (in my
> experience, it was very slow and unreliable, but that may have been
> due to other factors, eg indexing).

       Hi Canis,

       thanks for the link, it looks like a pretty good research job
:) At first sight it looks like is not trivial to do it, and I think
that my way by using the bulkloader could be more or less the same
than doing it via REST api (which my app supports also). I'll take a
closer look to your article and I'll then decide what way to use...
obviously, not the one with the "clear datastore" button, since it
doesn't exist :)

       thanks
       Jose


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Doug Chestnut  
View profile  
 More options Jul 1 2008, 8:49 am
From: "Doug Chestnut" <dougchest...@gmail.com>
Date: Tue, 1 Jul 2008 08:49:00 -0400
Subject: Re: [google-appengine] Re: clear *production* datastore

Hi Jose,
I use this (and while true; do wget
http://myapp.appspot.com/purge?table=testtable&limit=50 -O /dev/null; sleep
10; done; )

class Purge(webapp.RequestHandler):
    def get(self):
        limit = self.request.get("limit")
        if not limit:
            limit = 10
        table = self.request.get('table')
        if not table:
            table = 'DefaultTable'
        exec('q = '+table+'.all()')
        [db.delete(result) for result in q.fetch(int(limit))]

HTH,
--Doug

On Tue, Jul 1, 2008 at 5:07 AM, José Oliver Segura <primi...@gmail.com>
wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
pronvit  
View profile  
(1 user)  More options Jul 1 2008, 7:10 am
From: pronvit <pron...@gmail.com>
Date: Tue, 1 Jul 2008 04:10:27 -0700 (PDT)
Local: Tues, Jul 1 2008 7:10 am
Subject: Re: clear *production* datastore
go to datastore viewer and modify limit= parameter in url field in
browser, if you have 2000 objects then specifying limit=1000 will give
you only 2 pages so you'll have to press select all and delete only
twice

On Jul 1, 12:32 am, "José Oliver Segura" <primi...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
José Oliver Segura  
View profile  
 More options Jul 1 2008, 12:51 pm
From: "José Oliver Segura" <primi...@gmail.com>
Date: Tue, 1 Jul 2008 18:51:27 +0200
Local: Tues, Jul 1 2008 12:51 pm
Subject: Re: [google-appengine] Re: clear *production* datastore

On Tue, Jul 1, 2008 at 1:10 PM, pronvit <pron...@gmail.com> wrote:

> go to datastore viewer and modify limit= parameter in url field in
> browser, if you have 2000 objects then specifying limit=1000 will give
> you only 2 pages so you'll have to press select all and delete only
> twice

Nice try ;) but datastore viewer complaints with limits like 1000 or 500 with:

"There were errors:

    * Limit

",

it works with 100, but 200 gives a server error. I think the only way
would be bul/self-api way...

Thanks anyway!!!

Best,
Jose


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Charlie  
View profile  
 More options Jul 23 2008, 1:59 pm
From: Charlie <schmi...@gmail.com>
Date: Wed, 23 Jul 2008 10:59:11 -0700 (PDT)
Local: Wed, Jul 23 2008 1:59 pm
Subject: Re: clear *production* datastore
Has anyone put in a feature request for this?  Deleting a few thousand
entities is painful!  And I've already had to do it many times.  Is it
possible to just remove an entire entity class?

- Charlie.

On Jul 1, 9:51 am, "José Oliver Segura" <primi...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
abwaters  
View profile  
 More options Aug 9 2008, 11:59 pm
From: abwaters <abry...@gmail.com>
Date: Sat, 9 Aug 2008 20:59:18 -0700 (PDT)
Local: Sat, Aug 9 2008 11:59 pm
Subject: Re: clear *production* datastore
Yeah...i found out the limits the hard way.  I wrote the following
function to delete a large table and it worked great for smalling
tables but I shut down my application quickly when I tried doing any
more than that.

def deleteAllEntities(table):
        q = db.GqlQuery("SELECT * FROM "+table)
        results = q.fetch(100)
        while len(results) > 0:
                for result in results:
                        result.delete()
                q = db.GqlQuery("SELECT * FROM "+table)
                results = q.fetch(100)

On Jul 23, 10:59 am, Charlie <schmi...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
thedude  
View profile  
 More options Aug 24 2008, 6:17 pm
From: thedude <rich.schi...@gmail.com>
Date: Sun, 24 Aug 2008 15:17:07 -0700 (PDT)
Local: Sun, Aug 24 2008 6:17 pm
Subject: Re: clear *production* datastore

i did something similar. wrote a /delete handler which would just loop
and fetch(100) objects and delete.

a real pain though since the app engine frequently complains about
"over limit"...so i wrapped a curl request to this url in a bash while
loop script that just hammers away while i get lunch deleteing 1000's
of entities.

there must be a better way...

rich

On Aug 9, 8:59 pm, abwaters <abry...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google