Does anyone know if it possible to delete a namespace i App Engine?
I can iterate over all namespaces but would like to erase a namespace when it is no longer in use.
Thanks, Carl
A namespace is a property of an entity key. Deleting the namespace really means finding and deleting everything in a given namespace. http://code.google.com/appengine/docs/python/datastore/metadataqueries.html lays out the details. Basically, you determine the namespace you want to clear out, switch to it, then nuke the entities there.
If a namespace has a lot of entities, consider using the mapreduce framework (http://code.google.com/p/appengine-mapreduce/) to parcel the work up into chunks that will run without timing out.
If you delete all the entities, the namespace should be deleted. If the empty namespace appears to be showing up in Admin Console, this could happen due to some metadata entries being left in the namespace. The newer Cloud Console will not show the empty namespace. In order to get the namespace to disappear completely from the drop-down menu of the old Admin Console please refresh the page after removing all namespace entities.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With