Skip to content

Instantly share code, notes, and snippets.

@anuvrat
Created February 26, 2012 13:00
Show Gist options
  • Save anuvrat/1916586 to your computer and use it in GitHub Desktop.
Save anuvrat/1916586 to your computer and use it in GitHub Desktop.
A sample user defined function for hive
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