Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig, mail # user - PigServer, load query fails, passes on grunt


+
ÐΞ€ρ@...) 2013-05-04, 05:52
+
ÐΞ€ρ@...) 2013-05-04, 06:24
Copy link to this message
-
Re: PigServer, load query fails, passes on grunt
Jonathan Coveney 2013-05-04, 21:51
Why do you have an "as" statement with the store? The schema should come
down with the script. That's probably the issue.
2013/5/4 ÐΞ€ρ@Ҝ (๏̯͡๏) <[EMAIL PROTECTED]>

> Ignore above query. Its incorrect.
>
> I have following pig script
> A = LOAD 'textinput' using PigStorage() as (a0:chararray, a1:chararray,
> a2:chararray, a3:chararray, a4:chararray, a5:chararray, a6:chararray,
> a7:chararray, a8:chararray,a9:chararray);
> describe A;
> store A into 'output2' using PigStorage();
>
> This works fine.
>
> However when i modify the store statement to
> store A into 'output3' using PigStorage() as (a0:chararray, a1:chararray,
> a2:chararray, a3:chararray, a4:chararray, a5:chararray, a6:chararray,
> a7:chararray, a8:chararray,a9:chararray);
>
> It fails with below error
> 2013-05-04 11:49:56,296 [main] ERROR org.apache.pig.tools.grunt.Grunt -
> ERROR 1200: <line 9, column 42>  mismatched input 'as' expecting SEMI_COLON
>
>
>
> On Sat, May 4, 2013 at 11:22 AM, ÐΞ€ρ@Ҝ (๏̯͡๏) <[EMAIL PROTECTED]>
> wrote:
>
> > PIG 0.11
> > Query :
> > I register the below string
> > String query = "A = LOAD '" + BENCHMARK_PARQUET_MR_DATA_TEXTINPUT + "'
> > using PigStorage() as (" + schemaString + ");";
> >
> > with
> > pigServer.registerQuery(query);
> >
> > It translates to
> >
> >  A = LOAD '/home/deepakkv/benchmark/PIG/data/textinput' using
> PigStorage()
> > as (a0:chararray, a1:chararray, a2:chararray, a3:chararray, a4:chararray,
> > a5:chararray, a6:chararray, a7:chararray, a8:chararray, a9:chararray);
> >
> >
> > Exception
> > Caused by: Failed to parse: <line 1, column 357>  mismatched input 'AS'
> > expecting SEMI_COLON
> >     at
> > org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:235)
> >     at
> > org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:177)
> >     at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1599)
> >
> >
> > The very same query works in pig grunt shell.
> > --
> > Deepak
> >
> >
>
>
> --
> Deepak
>
+
ÐΞ€ρ@...) 2013-05-06, 05:25