Skip to content

Instantly share code, notes, and snippets.

@jiminoc
Created August 12, 2011 16:25
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 jiminoc/1142403 to your computer and use it in GitHub Desktop.
Save jiminoc/1142403 to your computer and use it in GitHub Desktop.
Example of a Pig import Macro
-- Data would be in the following format
-- 2011-01-01^pageview^http://somesite.com/url1^randomuserid123
DEFINE grvschema(inputdata)
returns BEACONS {
$BEACONS = LOAD '$inputdata' USING PigStorage('^') as (date:chararray, action:chararray, url:chararray, userId:chararray);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment