-Re: Need help to resolve one error
Haider 2013-11-24, 15:24
thanks for your reply.
Even after changing the PIG_CLASSPATH,it is giving me same error.
On Fri, Nov 22, 2013 at 5:19 AM, Daniel Dai <[EMAIL PROTECTED]> wrote:
> Can you try setup PIG_CLASSPATH before running Pig?
> export PIG_CLASSPATH=/home/hdmaster/Downloads/piggybank.jar
> On Wed, Nov 20, 2013 at 10:50 PM, Haider <[EMAIL PROTECTED]> wrote:
> > Hi I am new to PIG scripting.
> > I am trying to parse XML values through a pig script but getting the
> > ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1070: Could not resolve
> > org.apache.pig.piggybank.storage.XMLLoader using imports: [,
> > org.apache.pig.builtin., org.apache.pig.impl.builtin.]
> > my XML file is this
> > <CATALOG>
> > <CD>
> > <TITLE>hadoop developer</TITLE>
> > <ARTIST>Haider</ARTIST>
> > <COUNTRY>india</COUNTRY>
> > <COMPANY>Deloitte</COMPANY>
> > <PRICE>10.90</PRICE>
> > <YEAR>2013</YEAR>
> > </CD>
> > </CATALOG>
> > and my pig script is
> > REGISTER '/home/hdmaster/Downloads/piggybank.jar';
> > A = LOAD '/home/hdmaster/Downloads/sample.xml' USING
> > org.apache.pig.piggybank.storage.XMLLoader('CD')
> > AS (x:chararray);
> > B = foreach A GENERATE FLATTEN(REGEX_EXTRACT_ALL(x,
> > AS (title:chararray, artist:chararray, country:chararray,
> > company:chararray, price:double, year:int);
> > store B into '/home/hdmaster/Downloads/results'
> > Any help on this highly helpful to me.
> > Thanks
> > Haider
> CONFIDENTIALITY NOTICE
> NOTICE: This message is intended for the use of the individual or entity to
> which it is addressed and may contain information that is confidential,
> privileged and exempt from disclosure under applicable law. If the reader
> of this message is not the intended recipient, you are hereby notified that
> any printing, copying, dissemination, distribution, disclosure or
> forwarding of this communication is strictly prohibited. If you have
> received this communication in error, please contact the sender immediately
> and delete it from your system. Thank You.