Skip to content

Instantly share code, notes, and snippets.

@rjurney
Last active December 17, 2015 23:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rjurney/5686720 to your computer and use it in GitHub Desktop.
Save rjurney/5686720 to your computer and use it in GitHub Desktop.
Github Archive's WatchEvent
/* Watch events happen whenever a user 'watches' a github project */
watch_events = LOAD '/tmp/WatchEvent'; /* s3://github-explorer/WatchEvent */
watch_ratings = FOREACH watch_events GENERATE (chararray)$0#'actor'#'login' AS follower:chararray,
(chararray)$0#'repo'#'name' AS repo:chararray,
1.0 AS rating;
{
"type": "WatchEvent",
"actor": {
"avatar_url": "https://secure.gravatar.com/avatar/2a8d090768d237544a7c69a0f9c217c7?d=http://github.dev%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
"url": "https://api.github.dev/users/timgluz",
"login": "timgluz",
"id": 1223889,
"gravatar_id": "2a8d090768d237544a7c69a0f9c217c7"
},
"repo": {
"url": "https://api.github.dev/repos/bartaz/impress.js",
"id": 3065454,
"name": "bartaz/impress.js"
},
"public": true,
"payload": {
"action": "started"
},
"id": "1508512289",
"created_at": "2012-01-01T00:01:12Z"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment