olga
Wed, 09 Apr 2008 12:34:41 -0700
Added: incubator/pig/trunk/test/org/apache/pig/test/data/ConfFile3.txt URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/ConfFile3.txt?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/ConfFile3.txt (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/ConfFile3.txt Wed Apr 9 12:33:40 2008 @@ -0,0 +1 @@ +destination='this shud be skipped' \ No newline at end of file Added: incubator/pig/trunk/test/org/apache/pig/test/data/ConfFileDuplicates.txt URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/ConfFileDuplicates.txt?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/ConfFileDuplicates.txt (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/ConfFileDuplicates.txt Wed Apr 9 12:33:40 2008 @@ -0,0 +1,2 @@ +destination='\'/user/kaleidoscope/pow_stats/20080228/acct/InactiveAcct\'' +date = 'this is to be skipped' Added: incubator/pig/trunk/test/org/apache/pig/test/data/ConfFileSameParamMultipleTimes.txt URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/ConfFileSameParamMultipleTimes.txt?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/ConfFileSameParamMultipleTimes.txt (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/ConfFileSameParamMultipleTimes.txt Wed Apr 9 12:33:40 2008 @@ -0,0 +1,2 @@ +date = 'skip this' +date = 20080228 Added: incubator/pig/trunk/test/org/apache/pig/test/data/ConfFileWithEmptyComments.txt URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/ConfFileWithEmptyComments.txt?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/ConfFileWithEmptyComments.txt (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/ConfFileWithEmptyComments.txt Wed Apr 9 12:33:40 2008 @@ -0,0 +1,7 @@ +date = '20080228' + +#this is a comment line + +key1 = 'value1' + +#this is also a comment line Added: incubator/pig/trunk/test/org/apache/pig/test/data/ConfFileWithInvalidLines.txt URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/ConfFileWithInvalidLines.txt?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/ConfFileWithInvalidLines.txt (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/ConfFileWithInvalidLines.txt Wed Apr 9 12:33:40 2008 @@ -0,0 +1,2 @@ +date = '20080228' +this is an invalid line Added: incubator/pig/trunk/test/org/apache/pig/test/data/ConfFileWithValidLines.txt URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/ConfFileWithValidLines.txt?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/ConfFileWithValidLines.txt (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/ConfFileWithValidLines.txt Wed Apr 9 12:33:40 2008 @@ -0,0 +1,2 @@ +date = '20080228' +destination=/user/kaleidoscope/pow_stats/20080228/acct/InactiveAcct Added: incubator/pig/trunk/test/org/apache/pig/test/data/ExpectedResult.pig URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/ExpectedResult.pig?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/ExpectedResult.pig (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/ExpectedResult.pig Wed Apr 9 12:33:40 2008 @@ -0,0 +1,11 @@ + +aa = load '/data/intermediate/pow/elcarobootstrap/account/full/weekly/data/20080228' using PigStorage('\x01'); +bb = filter aa by (ARITY == '16') and ( $4 eq '' or $4 eq 'NULL' or $4 eq 'ss') parallel 400; +a = foreach bb generate $0,$12,$7; + +--generate inactive accts +inactiveAccounts = filter a by ($1 neq '') and ($1 == '2') parallel 400; +store inactiveAccounts into '/user/kaleidoscope/pow_stats/20080228/acct/InactiveAcct'; +grpInactiveAcct = group inactiveAccounts all; +countInactiveAcct = foreach grpInactiveAcct { generate COUNT( inactiveAccounts ); } +store countInactiveAcct into '/user/kaleidoscope/pow_stats/20080228/acct_stats/InactiveAcctCount'; \ No newline at end of file Added: incubator/pig/trunk/test/org/apache/pig/test/data/ExpectedResult2.pig URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/ExpectedResult2.pig?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/ExpectedResult2.pig (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/ExpectedResult2.pig Wed Apr 9 12:33:40 2008 @@ -0,0 +1,11 @@ + +aa = load '/data/intermediate/pow/elcarobootstrap/account/full/weekly/data/20080228' using PigStorage('\x01'); +bb = filter aa by (ARITY == '16') and ( $4 eq '' or $4 eq 'NULL' or $4 eq 'ss') parallel 400; +a = foreach bb generate $0,$12,$7; + +--generate inactive accts +inactiveAccounts = filter a by ($1 neq '$column1') and ($1 == '2') parallel 400; +store inactiveAccounts into '/user/kaleidoscope/pow_stats/20080228/acct/InactiveAcct'; +grpInactiveAcct = group inactiveAccounts all; +countInactiveAcct = foreach grpInactiveAcct { generate COUNT( inactiveAccounts ); } +store countInactiveAcct into '/user/kaleidoscope/pow_stats/20080228/acct_stats/InactiveAcctCount'; \ No newline at end of file Added: incubator/pig/trunk/test/org/apache/pig/test/data/generate_date.sh URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/generate_date.sh?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/generate_date.sh (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/generate_date.sh Wed Apr 9 12:33:40 2008 @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ $# -eq 0 ] +then + echo "20080228"; +elif [ $# -eq 1 ] +then + #echo `date +%Y``date +%m``date +%d`; + echo $1; +fi Added: incubator/pig/trunk/test/org/apache/pig/test/data/input1.pig URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/input1.pig?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/input1.pig (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/input1.pig Wed Apr 9 12:33:40 2008 @@ -0,0 +1,11 @@ + +aa = load '/data/intermediate/pow/elcarobootstrap/account/full/weekly/data/$date' using PigStorage('\x01'); +bb = filter aa by (ARITY == '16') and ( $4 eq '' or $4 eq 'NULL' or $4 eq 'ss') parallel 400; +a = foreach bb generate $0,$12,$7; + +--generate inactive accts +inactiveAccounts = filter a by ($1 neq '') and ($1 == '2') parallel 400; +store inactiveAccounts into '/user/kaleidoscope/pow_stats/20080228/acct/InactiveAcct'; +grpInactiveAcct = group inactiveAccounts all; +countInactiveAcct = foreach grpInactiveAcct { generate COUNT( inactiveAccounts ); } +store countInactiveAcct into '/user/kaleidoscope/pow_stats/20080228/acct_stats/InactiveAcctCount'; Added: incubator/pig/trunk/test/org/apache/pig/test/data/input2.pig URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/input2.pig?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/input2.pig (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/input2.pig Wed Apr 9 12:33:40 2008 @@ -0,0 +1,12 @@ + +aa = load '/data/intermediate/pow/elcarobootstrap/account/full/weekly/data/$param' using PigStorage('\x01'); +%declare param '2008.txt' +bb = filter aa by (ARITY == '16') and ( $4 eq '' or $4 eq 'NULL' or $4 eq 'ss') parallel 400; +a = foreach bb generate $0,$12,$7; + +--generate inactive accts +inactiveAccounts = filter a by ($1 neq '') and ($1 == '2') parallel 400; +store inactiveAccounts into '/user/kaleidoscope/pow_stats/20080228/acct/InactiveAcct'; +grpInactiveAcct = group inactiveAccounts all; +countInactiveAcct = foreach grpInactiveAcct { generate COUNT( inactiveAccounts ); } +store countInactiveAcct into '/user/kaleidoscope/pow_stats/20080228/acct_stats/InactiveAcctCount'; Added: incubator/pig/trunk/test/org/apache/pig/test/data/input3.pig URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/input3.pig?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/input3.pig (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/input3.pig Wed Apr 9 12:33:40 2008 @@ -0,0 +1,11 @@ + +aa = load '/data/intermediate/pow/elcarobootstrap/account/full/weekly/data' using PigStorage('\x01'); +bb = filter aa by (ARITY == '16') and ( $4 eq '' or $4 eq 'NULL' or $4 eq 'ss') parallel 400; +a = foreach bb generate $0,$12,$7; + +--generate inactive accts +inactiveAccounts = filter a by ($1 neq '') and ($1 == '2') parallel 400; +store inactiveAccounts into '/user/kaleidoscope/pow_stats/20080228/acct/InactiveAcct'; +grpInactiveAcct = group inactiveAccounts all; +countInactiveAcct = foreach grpInactiveAcct { generate COUNT( inactiveAccounts ); } +store countInactiveAcct into '/user/kaleidoscope/pow_stats/20080228/acct_stats/InactiveAcctCount'; Added: incubator/pig/trunk/test/org/apache/pig/test/data/input4.pig URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/input4.pig?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/input4.pig (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/input4.pig Wed Apr 9 12:33:40 2008 @@ -0,0 +1,12 @@ + +%declare date `sh test/org/apache/pig/test/data/generate_date.sh` +aa = load '/data/intermediate/pow/elcarobootstrap/account/full/weekly/data/$date' using PigStorage('\x01'); +bb = filter aa by (ARITY == '16') and ( $4 eq '' or $4 eq 'NULL' or $4 eq 'ss') parallel 400; +a = foreach bb generate $0,$12,$7; + +--generate inactive accts +inactiveAccounts = filter a by ($1 neq '') and ($1 == '2') parallel 400; +store inactiveAccounts into '/user/kaleidoscope/pow_stats/20080228/acct/InactiveAcct'; +grpInactiveAcct = group inactiveAccounts all; +countInactiveAcct = foreach grpInactiveAcct { generate COUNT( inactiveAccounts ); } +store countInactiveAcct into '/user/kaleidoscope/pow_stats/20080228/acct_stats/InactiveAcctCount'; Added: incubator/pig/trunk/test/org/apache/pig/test/data/inputCmdlineParamPriortoDeclare.pig URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/inputCmdlineParamPriortoDeclare.pig?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/inputCmdlineParamPriortoDeclare.pig (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/inputCmdlineParamPriortoDeclare.pig Wed Apr 9 12:33:40 2008 @@ -0,0 +1,12 @@ + +aa = load '/data/intermediate/pow/elcarobootstrap/account/full/weekly/data/$param' using PigStorage('\x01'); +%declare param '2008.txt' +bb = filter aa by (ARITY == '16') and ( $4 eq '' or $4 eq 'NULL' or $4 eq 'ss') parallel 400; +a = foreach bb generate $0,$12,$7; + +--generate inactive accts +inactiveAccounts = filter a by ($1 neq '') and ($1 == '2') parallel 400; +store inactiveAccounts into '/user/kaleidoscope/pow_stats/20080228/acct/InactiveAcct'; +grpInactiveAcct = group inactiveAccounts all; +countInactiveAcct = foreach grpInactiveAcct { generate COUNT( inactiveAccounts ); } +store countInactiveAcct into '/user/kaleidoscope/pow_stats/20080228/acct_stats/InactiveAcctCount'; Added: incubator/pig/trunk/test/org/apache/pig/test/data/inputCmdnameAsParamDeclare.pig URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/inputCmdnameAsParamDeclare.pig?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/inputCmdnameAsParamDeclare.pig (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/inputCmdnameAsParamDeclare.pig Wed Apr 9 12:33:40 2008 @@ -0,0 +1,14 @@ + +%declare cmd 'test/org/apache/pig/test/data/generate_date' +%declare date '20080228' +%declare param `sh $cmd.sh $date` +aa = load '/data/intermediate/pow/elcarobootstrap/account/full/weekly/data/$param' using PigStorage('\x01'); +bb = filter aa by (ARITY == '16') and ( $4 eq '' or $4 eq 'NULL' or $4 eq 'ss') parallel 400; +a = foreach bb generate $0,$12,$7; + +--generate inactive accts +inactiveAccounts = filter a by ($1 neq '') and ($1 == '2') parallel 400; +store inactiveAccounts into '/user/kaleidoscope/pow_stats/20080228/acct/InactiveAcct'; +grpInactiveAcct = group inactiveAccounts all; +countInactiveAcct = foreach grpInactiveAcct { generate COUNT( inactiveAccounts ); } +store countInactiveAcct into '/user/kaleidoscope/pow_stats/20080228/acct_stats/InactiveAcctCount'; Added: incubator/pig/trunk/test/org/apache/pig/test/data/inputDefault.pig URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/inputDefault.pig?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/inputDefault.pig (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/inputDefault.pig Wed Apr 9 12:33:40 2008 @@ -0,0 +1,12 @@ +%default date '20080228' + +aa = load '/data/intermediate/pow/elcarobootstrap/account/full/weekly/data/$date' using PigStorage('\x01'); +bb = filter aa by (ARITY == '16') and ( $4 eq '' or $4 eq 'NULL' or $4 eq 'ss') parallel 400; +a = foreach bb generate $0,$12,$7; + +--generate inactive accts +inactiveAccounts = filter a by ($1 neq '') and ($1 == '2') parallel 400; +store inactiveAccounts into '/user/kaleidoscope/pow_stats/20080228/acct/InactiveAcct'; +grpInactiveAcct = group inactiveAccounts all; +countInactiveAcct = foreach grpInactiveAcct { generate COUNT( inactiveAccounts ); } +store countInactiveAcct into '/user/kaleidoscope/pow_stats/20080228/acct_stats/InactiveAcctCount'; Added: incubator/pig/trunk/test/org/apache/pig/test/data/inputEscape.pig URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/inputEscape.pig?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/inputEscape.pig (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/inputEscape.pig Wed Apr 9 12:33:40 2008 @@ -0,0 +1,12 @@ +%default column1 'asdf' + +aa = load '/data/intermediate/pow/elcarobootstrap/account/full/weekly/data/20080228' using PigStorage('\x01'); +bb = filter aa by (ARITY == '16') and ( $4 eq '' or $4 eq 'NULL' or $4 eq 'ss') parallel 400; +a = foreach bb generate $0,$12,$7; + +--generate inactive accts +inactiveAccounts = filter a by ($1 neq '\$column1') and ($1 == '2') parallel 400; +store inactiveAccounts into '/user/kaleidoscope/pow_stats/20080228/acct/InactiveAcct'; +grpInactiveAcct = group inactiveAccounts all; +countInactiveAcct = foreach grpInactiveAcct { generate COUNT( inactiveAccounts ); } +store countInactiveAcct into '/user/kaleidoscope/pow_stats/20080228/acct_stats/InactiveAcctCount'; Added: incubator/pig/trunk/test/org/apache/pig/test/data/inputMultipleDeclares.pig URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/inputMultipleDeclares.pig?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/inputMultipleDeclares.pig (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/inputMultipleDeclares.pig Wed Apr 9 12:33:40 2008 @@ -0,0 +1,13 @@ + +aa = load '/data/intermediate/pow/elcarobootstrap/account/full/weekly/data/$date' using PigStorage('\x01'); +bb = filter aa by (ARITY == '16') and ( $4 eq '' or $4 eq 'NULL' or $4 eq 'ss') parallel 400; +a = foreach bb generate $0,$12,$7; + +--generate inactive accts +%declare destLocation '\'/user/kaleidoscope/pow_stats/$date/acct/InactiveAcct\'' +inactiveAccounts = filter a by ($1 neq '') and ($1 == '2') parallel 400; +store inactiveAccounts into $destLocation; +%declare destLocation '\'/user/kaleidoscope/pow_stats/$date/acct_stats/InactiveAcctCount\'' +grpInactiveAcct = group inactiveAccounts all; +countInactiveAcct = foreach grpInactiveAcct { generate COUNT( inactiveAccounts ); } +store countInactiveAcct into $destLocation; Added: incubator/pig/trunk/test/org/apache/pig/test/data/inputMultipleParams.pig URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/inputMultipleParams.pig?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/inputMultipleParams.pig (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/inputMultipleParams.pig Wed Apr 9 12:33:40 2008 @@ -0,0 +1,11 @@ + +aa = load '/data/intermediate/pow/elcarobootstrap/account/full/weekly/data/$date' using PigStorage('\x01'); +bb = filter aa by (ARITY == '16') and ( $4 eq '' or $4 eq 'NULL' or $4 eq 'ss') parallel 400; +a = foreach bb generate $0,$12,$7; + +--generate inactive accts +inactiveAccounts = filter a by ($1 neq '') and ($1 == '2') parallel 400; +store inactiveAccounts into $destination; +grpInactiveAcct = group inactiveAccounts all; +countInactiveAcct = foreach grpInactiveAcct { generate COUNT( inactiveAccounts ); } +store countInactiveAcct into '/user/kaleidoscope/pow_stats/20080228/acct_stats/InactiveAcctCount'; Added: incubator/pig/trunk/test/org/apache/pig/test/data/inputSubWithinLiteral.pig URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/inputSubWithinLiteral.pig?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/inputSubWithinLiteral.pig (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/inputSubWithinLiteral.pig Wed Apr 9 12:33:40 2008 @@ -0,0 +1,13 @@ + +aa = load '/data/intermediate/pow/elcarobootstrap/account/full/weekly/data/$date' using PigStorage('\x01'); +bb = filter aa by (ARITY == '16') and ( $4 eq '' or $4 eq 'NULL' or $4 eq 'ss') parallel 400; +a = foreach bb generate $0,$12,$7; + +--generate inactive accts +%declare destLocation '/user/kaleidoscope/pow_stats/$date/acct/InactiveAcct' +inactiveAccounts = filter a by ($1 neq '') and ($1 == '2') parallel 400; +store inactiveAccounts into $destLocation; +%declare destLocation '/user/kaleidoscope/pow_stats/$date/acct_stats/InactiveAcctCount' +grpInactiveAcct = group inactiveAccounts all; +countInactiveAcct = foreach grpInactiveAcct { generate COUNT( inactiveAccounts ); } +store countInactiveAcct into $destLocation; Added: incubator/pig/trunk/test/org/apache/pig/test/data/inputSubstitutionWithinShellCommand.pig URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/inputSubstitutionWithinShellCommand.pig?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/inputSubstitutionWithinShellCommand.pig (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/inputSubstitutionWithinShellCommand.pig Wed Apr 9 12:33:40 2008 @@ -0,0 +1,13 @@ + +%DECLARE date '20080228' +%DECLARE formatted_date `sh test/org/apache/pig/test/data/generate_date.sh $date` +aa = load '/data/intermediate/pow/elcarobootstrap/account/full/weekly/data/$formatted_date' using PigStorage('\x01'); +bb = filter aa by (ARITY == '16') and ( $4 eq '' or $4 eq 'NULL' or $4 eq 'ss') parallel 400; +a = foreach bb generate $0,$12,$7; + +--generate inactive accts +inactiveAccounts = filter a by ($1 neq '') and ($1 == '2') parallel 400; +store inactiveAccounts into '/user/kaleidoscope/pow_stats/20080228/acct/InactiveAcct'; +grpInactiveAcct = group inactiveAccounts all; +countInactiveAcct = foreach grpInactiveAcct { generate COUNT( inactiveAccounts ); } +store countInactiveAcct into '/user/kaleidoscope/pow_stats/20080228/acct_stats/InactiveAcctCount'; Added: incubator/pig/trunk/test/org/apache/pig/test/data/inputSubstitutionWithinValue.pig URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/inputSubstitutionWithinValue.pig?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/inputSubstitutionWithinValue.pig (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/inputSubstitutionWithinValue.pig Wed Apr 9 12:33:40 2008 @@ -0,0 +1,14 @@ + +%Declare var1 '1' +%DECLARE var2 '6' +%declare total '$var1$var2' +aa = load '/data/intermediate/pow/elcarobootstrap/account/full/weekly/data/$date' using PigStorage('\x01'); +bb = filter aa by (ARITY == '$total') and ( $4 eq '' or $4 eq 'NULL' or $4 eq 'ss') parallel 400; +a = foreach bb generate $0,$12,$7; + +--generate inactive accts +inactiveAccounts = filter a by ($1 neq '') and ($1 == '2') parallel 400; +store inactiveAccounts into '/user/kaleidoscope/pow_stats/20080228/acct/InactiveAcct'; +grpInactiveAcct = group inactiveAccounts all; +countInactiveAcct = foreach grpInactiveAcct { generate COUNT( inactiveAccounts ); } +store countInactiveAcct into '/user/kaleidoscope/pow_stats/20080228/acct_stats/InactiveAcctCount'; Added: incubator/pig/trunk/test/org/apache/pig/test/data/inputThreeParams.pig URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/inputThreeParams.pig?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/inputThreeParams.pig (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/inputThreeParams.pig Wed Apr 9 12:33:40 2008 @@ -0,0 +1,13 @@ +%default tableName 'value to be skipped' + +aa = load '/data/intermediate/pow/elcarobootstrap/account/full/weekly/data/$date' using PigStorage('\x01'); +bb = filter aa by (ARITY == '16') and ( $4 eq '' or $4 eq 'NULL' or $4 eq 'ss') parallel 400; +a = foreach bb generate $0,$12,$7; + +%declare tableName 'inactiveAccounts' +--generate inactive accts +$tableName = filter a by ($1 neq '') and ($1 == '2') parallel 400; +store $tableName into $destination; +grpInactiveAcct = group $tableName all; +countInactiveAcct = foreach grpInactiveAcct { generate COUNT( $tableName ); } +store countInactiveAcct into '/user/kaleidoscope/pow_stats/20080228/acct_stats/InactiveAcctCount'; Added: incubator/pig/trunk/test/org/apache/pig/test/data/newinputS.txt URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/newinputS.txt?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/newinputS.txt (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/newinputS.txt Wed Apr 9 12:33:40 2008 @@ -0,0 +1,10 @@ +key1=value1 +date=20080202 +mypath=/user/abhit/$date +date2=20080202.txt +path2='user/kal/$date/$date2' + + +a = 2 +b = 3 +c = $a + $b \ No newline at end of file Added: incubator/pig/trunk/test/org/apache/pig/test/data/output1.pig URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/output1.pig?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/output1.pig (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/output1.pig Wed Apr 9 12:33:40 2008 @@ -0,0 +1,11 @@ + +aa = load '/data/intermediate/pow/elcarobootstrap/account/full/weekly/data/20080228' using PigStorage('\x01'); +bb = filter aa by (ARITY == '16') and ( $4 eq '' or $4 eq 'NULL' or $4 eq 'ss') parallel 400; +a = foreach bb generate $0,$12,$7; + +--generate inactive accts +inactiveAccounts = filter a by ($1 neq '$column1') and ($1 == '2') parallel 400; +store inactiveAccounts into '/user/kaleidoscope/pow_stats/20080228/acct/InactiveAcct'; +grpInactiveAcct = group inactiveAccounts all; +countInactiveAcct = foreach grpInactiveAcct { generate COUNT( inactiveAccounts ); } +store countInactiveAcct into '/user/kaleidoscope/pow_stats/20080228/acct_stats/InactiveAcctCount'; Added: incubator/pig/trunk/test/org/apache/pig/test/data/output3.pig URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/data/output3.pig?rev=646496&view=auto ============================================================================== --- incubator/pig/trunk/test/org/apache/pig/test/data/output3.pig (added) +++ incubator/pig/trunk/test/org/apache/pig/test/data/output3.pig Wed Apr 9 12:33:40 2008 @@ -0,0 +1,11 @@ + +aa = load '/data/intermediate/pow/elcarobootstrap/account/full/weekly/data/20080228' using PigStorage('\x01'); +bb = filter aa by (ARITY == '16') and ( $4 eq '' or $4 eq 'NULL' or $4 eq 'ss') parallel 400; +a = foreach bb generate $0,$12,$7; + +--generate inactive accts +inactiveAccounts = filter a by ($1 neq '') and ($1 == '2') parallel 400; +store inactiveAccounts into '/user/kaleidoscope/pow_stats/20080228/acct/InactiveAcct'; +grpInactiveAcct = group inactiveAccounts all; +countInactiveAcct = foreach grpInactiveAcct { generate COUNT( inactiveAccounts ); } +store countInactiveAcct into '/user/kaleidoscope/pow_stats/20080228/acct_stats/InactiveAcctCount';