4
我正在嘗試僅處理特定日期後發生的事件。爲了實現這一點,我試圖使用大於運算符來傳遞過濾器 param(mapper_params)。但是,我得到以下錯誤:「只支持平等過濾器」。爲什麼DatastoreInputReader過濾器參數只支持相等運算符?
這裏是我的run方法看起來像:
def run(self, action, occurred_after):
output = yield mapreduce_pipeline.MapreducePipeline(
"word_count",
"main.word_count_map",
"main.word_count_reduce",
"mapreduce.input_readers.DatastoreInputReader",
"mapreduce.output_writers.FileOutputWriter",
mapper_params={
"entity_kind": 'models.Event',
"filters": [("action", "=", action),
("occurred_on", ">", occurred_after)]
},
reducer_params={
"filesystem": "gs",
"gs_bucket_name": "mybucket/mapreduce_output",
"mime_type": "text/plain",
"output_sharding": "input"
},
shards=1)
有誰知道爲什麼只支持「=」操作?