Created
June 22, 2011 18:48
-
-
Save mccutchen/1040802 to your computer and use it in GitHub Desktop.
Simple App Engine mapreduce counter example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from google.appengine.ext.mapreduce import operation as op | |
def count_impressions_by_month(entity): | |
key = entity.timestamp.strftime('%Y-%m') | |
yield op.counters.Increment(key) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment