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

Switch to Plain View
Pig >> mail # user >> ERROR 1070: Could not resolve org.apache.pig.piggybank.evaluation.datetime.convert.ISOToMonth using imports:


+
yogesh dhari 2012-09-30, 05:31
+
Russell Jurney 2012-09-30, 06:21
Copy link to this message
-
RE: ERROR 1070: Could not resolve org.apache.pig.piggybank.evaluation.datetime.convert.ISOToMonth using imports:

Hurrayyyy , its done now  :-)

Thanks a lot Russell :-)

Two more silly question !!!

2009-09-01T00:00:00.000Z
is the formate its showing,
I want only yyyy-mm-dd format, how to achieve it &

Do we need to register and  CustomFormatToISO/ ISOToMonth every time in new session?
Is there any other way to make it permanent.?

Thanks & Regards
Yogesh Kumar Dhari

> From: [EMAIL PROTECTED]
> Date: Sat, 29 Sep 2012 23:21:54 -0700
> Subject: Re: ERROR 1070: Could not resolve org.apache.pig.piggybank.evaluation.datetime.convert.ISOToMonth using imports:
> To: [EMAIL PROTECTED]
>
> You have the wrong package name for isotomonth. It is in truncate, not convert.
>
> Russell Jurney http://datasyndrome.com
>
> On Sep 29, 2012, at 10:31 PM, yogesh dhari <[EMAIL PROTECTED]> wrote:
>
> >
> > grunt> register /opt/pig-0.10.0/contrib/piggybank/java/piggybank.jar
> > grunt> register /opt/pig-0.10.0/build/ivy/lib/Pig/joda-time-1.6.jar
> >
> > and also defined
> >
> > grunt> define CustomFormatToISO  org.apache.pig.piggybank.evaluation.datetime.convert.CustomFormatToISO()  ;
> > grunt> define ISOToMonth  org.apache.pig.piggybank.evaluation.datetime.convert.ISOToMonth();
> >
> > Now I performed the query on NYSE_B.
> >
> > grunt> describe NYSE_B;
> >
> > NYSE_B: {exchange: chararray,symbol: chararray,date: chararray,divi: float}
> >
> > ans = foreach (group NYSE_B by ISOToMonth(date)) generate group as monthh, MAX(NYSE_A.divi) as max_rt;
> >
> > got the ERROR
> >
> > 2012-09-30 10:25:15,821 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1070: Could not resolve org.apache.pig.piggybank.evaluation.datetime.convert.ISOToMonth using imports:
> > [, org.apache.pig.builtin., org.apache.pig.impl.builtin.]
> > 2012-09-30 10:25:15,822 [main] WARN  org.apache.pig.tools.grunt.Grunt - There is no log file to write to.
> > 2012-09-30 10:25:15,822 [main] ERROR org.apache.pig.tools.grunt.Grunt - Failed to parse: Pig script failed to parse:
> > <line 12, column 31> Failed to generate logical plan. Nested exception: java.lang.RuntimeException:
> > Cannot instantiate: org.apache.pig.piggybank.evaluation.datetime.convert.ISOToMonth
> >    at org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:182)
> >    at org.apache.pig.PigServer$Graph.validateQuery(PigServer.java:1565)
> >    at org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1538)
> >
> > Please help & suggest
> >
> > Thanks & Regards
> > Yogesh Kumar Dhari
> >