Return-Path: X-Original-To: apmail-pig-dev-archive@www.apache.org Delivered-To: apmail-pig-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 490C8D656 for ; Thu, 27 Sep 2012 00:37:08 +0000 (UTC) Received: (qmail 43138 invoked by uid 500); 27 Sep 2012 00:37:07 -0000 Delivered-To: apmail-pig-dev-archive@pig.apache.org Received: (qmail 43095 invoked by uid 500); 27 Sep 2012 00:37:07 -0000 Mailing-List: contact dev-help@pig.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pig.apache.org Delivered-To: mailing list dev@pig.apache.org Received: (qmail 43077 invoked by uid 500); 27 Sep 2012 00:37:07 -0000 Delivered-To: apmail-hadoop-pig-dev@hadoop.apache.org Received: (qmail 43073 invoked by uid 99); 27 Sep 2012 00:37:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Sep 2012 00:37:07 +0000 Date: Thu, 27 Sep 2012 11:37:07 +1100 (NCT) From: "Joshua Hartman (JIRA)" To: pig-dev@hadoop.apache.org Message-ID: <730122766.131535.1348706227797.JavaMail.jiratomcat@arcas> In-Reply-To: <181617317.1153.1308011207354.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (PIG-2122) Parameter Substitution doesn't work in the Grunt shell MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PIG-2122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13464326#comment-13464326 ] Joshua Hartman commented on PIG-2122: ------------------------------------- This irritates me on a weekly basis. I'm often running ad-hoc analysis in grunt with snippets taken from some heavier scripts I've written and I get bitten ALL the time. > Parameter Substitution doesn't work in the Grunt shell > ------------------------------------------------------ > > Key: PIG-2122 > URL: https://issues.apache.org/jira/browse/PIG-2122 > Project: Pig > Issue Type: Bug > Affects Versions: 0.8.0, 0.8.1 > Reporter: Grant Ingersoll > Priority: Minor > > Simple param substitution and things like %declare (as copied out of the docs) don't work in the grunt shell. > #Start Pig with: Start Pig with: bin/pig -x local -p time=FOO > {quote} > foo = LOAD '/user/grant/foo.txt' AS (a:chararray, b:chararray, c:chararray); > Y = foreach foo generate *, '$time'; > dump Y; > {quote} > Output: > {quote} > 2011-06-13 20:22:24,197 [main] INFO org.apache.pig.backend.hadoop.executionengine.util.MapRedUtil - Total input paths to process : 1 > (1 2 3,,,$time) > (4 5 6,,,$time) > {quote} > Same script, stored in junk.pig, run as: bin/pig -x local -p time=FOO junk.pig > {quote} > 2011-06-13 20:23:38,864 [main] INFO org.apache.pig.backend.hadoop.executionengine.util.MapRedUtil - Total input paths to process : 1 > (1 2 3,,,FOO) > (4 5 6,,,FOO) > {quote} > Also, things like don't work (nor does %declare): > {quote} > grunt> %default DATE '20090101'; > 2011-06-13 20:18:19,943 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Encountered " "%default "" at line 1, column 1. > Was expecting one of: > > "cat" ... > "fs" ... > "sh" ... > "cd" ... > "cp" ... > "copyFromLocal" ... > "copyToLocal" ... > "dump" ... > "describe" ... > "aliases" ... > "explain" ... > "help" ... > "kill" ... > "ls" ... > "mv" ... > "mkdir" ... > "pwd" ... > "quit" ... > "register" ... > "rm" ... > "rmf" ... > "set" ... > "illustrate" ... > "run" ... > "exec" ... > "scriptDone" ... > "" ... > ... > ";" ... > > Details at logfile: /Users/grant.ingersoll/projects/apache/pig/release-0.8.1/pig_1308002917912.log > {quote} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira