piglatin输入不匹配';'期望左对齐(ibm biginsights)

e1xvtsh3  于 2021-06-24  发布在  Pig
关注(0)|答案(1)|浏览(334)

抱歉问了个天真的问题。我是个新手。我有一个Pig的脚本和下面的错误:

ERROR [main]      org.apache.pig.tools.grunt.Grunt     - ERROR 1200: <file xxx.script, line 2, column 20>  mismatched input ';' expecting LEFT_PAREN

我的头骨是这样的:

a = load 'xxx.csv' using PigStorage(',') as (person:chararray,store:chararray,spent:float);
b = group a by store;
dump b;

下面是stacktrace:

ERROR 1200: <file xxx.script, line 2, column 20>  mismatched input ';' expecting LEFT_PAREN

org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1000: Error during parsing. <file xxx.script, line 2, column 20>  mismatched input ';' expecting LEFT_PAREN
at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1689)
at org.apache.pig.PigServer$Graph.access$000(PigServer.java:1409)
at org.apache.pig.PigServer.parseAndBuild(PigServer.java:342)
at org.apache.pig.PigServer.executeBatch(PigServer.java:367)
at org.apache.pig.PigServer.executeBatch(PigServer.java:353)
at org.apache.pig.tools.grunt.GruntParser.executeBatch(GruntParser.java:140)
at org.apache.pig.tools.grunt.GruntParser.processDump(GruntParser.java:769)
at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:372)
at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:198)
at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:173)
at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:84)
at org.apache.pig.Main.run(Main.java:607)
at org.apache.pig.Main.main(Main.java:156)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:94)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:619)
at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
Caused by: Failed to parse: <file /home/biadmin/xxx.script, line 2, column 20>  mismatched input ';' expecting LEFT_PAREN
at org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:241)
at org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:179)
at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1676)
... 17 more
klsxnrf1

klsxnrf11#

正如@surender raja所指出的,store是一个关键字,在将其更改为deptstore之后,我可以使用名称而不是$1来引用它

相关问题