Created
June 30, 2012 19:26
-
-
Save railsfactory-pramod/3025177 to your computer and use it in GitHub Desktop.
Split a line using byte position in PIG
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
REGISTER contrib/piggybank/java/piggybank.jar | |
DEFINE SUBSTRING org.apache.pig.piggybank.evaluation.string.SUBSTRING(); | |
A = load 'gutenberg/sample.txt'; | |
C = foreach A generate SUBSTRING((chararray)$0, 0, 5); | |
dump C; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment