Created
August 12, 2011 16:25
-
-
Save jiminoc/1142403 to your computer and use it in GitHub Desktop.
Example of a Pig import Macro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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