Updating a large number of entities in a datastore on Google App Engine

datastore, google-app-engine, python

Solution

Use a mapper - this is part of the MapReduce framework, but you only want the first component, map, as you don't need the shuffle/reduce step if you're simply mutating datastore entities.

Problem

I would like to perform a small operation on all entities of a specific kind and rewrite them to the datastore. I currently have 20,000 entities of this kind but would like a solution that would scale to any amount. What are my options?

Original source