Created
August 24, 2011 22:10
-
-
Save dvryaboy/1169412 to your computer and use it in GitHub Desktop.
How Pig treats semicolons in variable declarations
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
# Pay attention to where you put your semicolons lest they become part of the value! | |
cat tmp/default.pig | |
%default QUOTED '20090101'; | |
%default UNQUOTED $QUOTED; | |
l = load '/logs/$QUOTED'; | |
l = load '/logs/$UNQUOTED'; | |
pig -x local -r tmp/default.pig | |
2011-08-24 21:57:05,531 [main] INFO org.apache.pig.Main - Dry run completed. Substituted pig script is at tmp/default.pig.substituted | |
cat tmp/default.pig.substituted | |
; | |
l = load '/logs/20090101'; | |
l = load '/logs/20090101;'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment