Can you try setup PIG_CLASSPATH before running Pig?
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.
> 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
> <TITLE>hadoop developer</TITLE>
> and my pig script is
> REGISTER '/home/hdmaster/Downloads/piggybank.jar';
> A = LOAD '/home/hdmaster/Downloads/sample.xml' USING
> 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.
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.