I have a file in hdfs with 100 columns, which i want to proces using pig. I want to load this file into a tuple with columns names in a separate pig script, and reuse this script from other pig scripts. How do I do this?
Say this 100 column pig script is - 100col.pig. How do i call it from anotherone.pig?
Check into the exec
command (for batch processing) or the run
command (for interactive scripts). Also, if you need to use (non-grunt) shell commands, check the fs
command. Here's a good reference:
http://pig.apache.org/docs/r0.7.0/piglatin_ref2.html
You should try using macros that is present in pig version 0.9.
http://pig.apache.org/docs/r0.9.1/cont.html#macros
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With