You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Iman Elghandour <ie...@yahoo.com> on 2009/03/19 00:25:59 UTC
Outputting the Pig plans into a file
Hello,
I have been trying to output pig plans into a file as described in http://wiki.apache.org/pig/PigMultiQueryPerformanceSpecification
I am using the multiquery branch.
When I use the syntax described in the documentation, it returns an error "encounter <IDENTIFIER> "into" .
For example, I would say:
A= some query
explain A into outFile
I digged into the code, mainly: org.apache.pig.tools.pigscript.parser.PigScriptParser.java and org.apache.pig.tools.pigscript.parser.PigScriptParser.jj
I found that the syntax should be EXPLAIN OUT "file" alias. Well, I tried this but it failed as well. The returned error is: "Unable to find an operator for alias out". So I doubted that it is not recognizing the out as a keyword so I debugged the code. It turned to be that when it consumes the token OUT, an exception is raised in org.apache.pig.tools.pigscript.parser.PigScriptParser.java: getNextToken() line 2627 and the token kind is assumed to be 101.
I am not sure if the syntax i am using is wrong, I have tried a couple of variations but none of them worked for me. Or it is a bug.
Please advise me how I can do it.
Thanks,
Iman
__________________________________________________________________
Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger at http://ca.beta.messenger.yahoo.com/
Re: Outputting the Pig plans into a file
Posted by Gunther Hagleitner <ha...@yahoo-inc.com>.
Iman,
The syntax was recently changed in the multiquery dev branch to:
explain -out outFile A.
In PigScriptParser.jj: You were looking in the right place, but the OUT
token is defined as "-out".
I'll update the draft spec.
Thanks,
Gunther.
On 3/18/09 4:25 PM, "Iman Elghandour" <ie...@yahoo.com> wrote:
> Hello,
> I have been trying to output pig plans into a file as described in
> http://wiki.apache.org/pig/PigMultiQueryPerformanceSpecification
>
> I am using the multiquery branch.
> When I use the syntax described in the documentation, it returns an error
> "encounter <IDENTIFIER> "into" .
> For example, I would say:
> A= some query
> explain A into outFile
>
>
> I digged into the code, mainly:
> org.apache.pig.tools.pigscript.parser.PigScriptParser.java and
> org.apache.pig.tools.pigscript.parser.PigScriptParser.jj
>
> I found that the syntax should be EXPLAIN OUT "file" alias. Well, I tried
> this but it failed as well. The returned error is: "Unable to find an
> operator for alias out". So I doubted that it is not recognizing the out as a
> keyword so I debugged the code. It turned to be that when it consumes the
> token OUT, an exception is raised in
> org.apache.pig.tools.pigscript.parser.PigScriptParser.java: getNextToken()
> line 2627 and the token kind is assumed to be 101.
>
> I am not sure if the syntax i am using is wrong, I have tried a couple of
> variations but none of them worked for me. Or it is a bug.
> Please advise me how I can do it.
>
> Thanks,
> Iman
>
>
>
>
>
> __________________________________________________________________
> Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo!
> Canada Messenger at http://ca.beta.messenger.yahoo.com/