Created
February 26, 2012 13:00
-
-
Save anuvrat/1916586 to your computer and use it in GitHub Desktop.
A sample user defined function for hive
This file contains hidden or 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
while(<>) { | |
chomp; | |
# Input fields full_name, <more data> | |
my ($full_name, @other_cols) = split(/\t/); | |
my($first_name, $last_name) = _parse_name($full_name); | |
print join("\t", $first_name, $last_name, @other_cols) . "\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment