Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env ruby
- require 'mongo-hadoop'
- MongoHadoop.map do |document|
- if document['user'] and document['user']['time_zone']
- [{ :_id => document['user']['time_zone'], :count => 1 }]
- else
- [{ :_id => 'Unknown', :count => 1 }]
- end
- end
Add Comment
Please, Sign In to add comment