Guest User

Untitled

a guest
Nov 21st, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. #!/usr/bin/env ruby
  2. require 'mongo-hadoop'
  3.  
  4. MongoHadoop.map do |document|
  5. if document['user'] and document['user']['time_zone']
  6. [{ :_id => document['user']['time_zone'], :count => 1 }]
  7. else
  8. [{ :_id => 'Unknown', :count => 1 }]
  9. end
  10. end
Add Comment
Please, Sign In to add comment