<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question org.apache.pig.piggybank.evaluation.xml.XPath in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/org-apache-pig-piggybank-evaluation-xml-XPath/m-p/42299#M32965</link>
    <description>&lt;P&gt;I'm creating a PIG query running on Hue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first part of my query does run:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;REGISTER piggybank.jar&lt;BR /&gt;A = LOAD '/durocan/staging/installationconfigs/InstallationConfigExample.xml' using org.apache.pig.piggybank.storage.XMLLoader('Installation') as (x:chararray);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second part fails:&lt;/P&gt;&lt;P&gt;B = FOREACH A GENERATE org.apache.pig.piggybank.evaluation.xml.XPath(x, 'Installation/Durocan/Sensors/Sensor/Name');&lt;/P&gt;&lt;P&gt;dump B;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;PRE&gt; Could not resolve org.apache.pig.piggybank.evaluation.xml.XPath&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How is it possible that&amp;nbsp;&lt;SPAN&gt;org.apache.pig.piggybank.storage.XMLLoader get's &amp;nbsp;resolved and&amp;nbsp;org.apache.pig.piggybank.evaluation.xml.XPath is not?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Apr 2026 13:51:03 GMT</pubDate>
    <dc:creator>Lentini1982</dc:creator>
    <dc:date>2026-04-21T13:51:03Z</dc:date>
    <item>
      <title>org.apache.pig.piggybank.evaluation.xml.XPath</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/org-apache-pig-piggybank-evaluation-xml-XPath/m-p/42299#M32965</link>
      <description>&lt;P&gt;I'm creating a PIG query running on Hue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first part of my query does run:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;REGISTER piggybank.jar&lt;BR /&gt;A = LOAD '/durocan/staging/installationconfigs/InstallationConfigExample.xml' using org.apache.pig.piggybank.storage.XMLLoader('Installation') as (x:chararray);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second part fails:&lt;/P&gt;&lt;P&gt;B = FOREACH A GENERATE org.apache.pig.piggybank.evaluation.xml.XPath(x, 'Installation/Durocan/Sensors/Sensor/Name');&lt;/P&gt;&lt;P&gt;dump B;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;PRE&gt; Could not resolve org.apache.pig.piggybank.evaluation.xml.XPath&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How is it possible that&amp;nbsp;&lt;SPAN&gt;org.apache.pig.piggybank.storage.XMLLoader get's &amp;nbsp;resolved and&amp;nbsp;org.apache.pig.piggybank.evaluation.xml.XPath is not?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2026 13:51:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/org-apache-pig-piggybank-evaluation-xml-XPath/m-p/42299#M32965</guid>
      <dc:creator>Lentini1982</dc:creator>
      <dc:date>2026-04-21T13:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: org.apache.pig.piggybank.evaluation.xml.XPath</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/org-apache-pig-piggybank-evaluation-xml-XPath/m-p/42302#M32966</link>
      <description>&lt;P&gt;Fixed it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems that the Cloudera deployment of the Piggybank.jar does not containt the xpath functionality&lt;BR /&gt;(or any xml functionality at all).&lt;/P&gt;&lt;P&gt;See:&lt;A href="http://grepcode.com/project/repository.cloudera.com/content/repositories/releases/org.apache.pig/piggybank" target="_self"&gt;&amp;nbsp;http://grepcode.com/project/repository.cloudera.com/content/repositories/releases/org.apache.pig/piggybank&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I downloaded piggybank.jar 0.15.0 from &lt;A href="https://mvnrepository.com/artifact/org.apache.pig/piggybank/0.15.0" target="_self"&gt;https://mvnrepository.com/artifact/org.apache.pig/piggybank/0.15.0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;put it in /home/ubuntu and used it in my script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;REGISTER /home/ubuntu/piggybank-0.15.0.jar
A = LOAD '/MyPath/Example.xml' using org.apache.pig.piggybank.storage.XMLLoader('RootNode') as (xmlContents:chararray);
B= FOREACH A GENERATE org.apache.pig.piggybank.evaluation.xml.XPath(xmlContents, 'MyXpathQuery');
STORE B&amp;nbsp;INTO 'Output/B' USING PigStorage();&lt;/PRE&gt;&lt;P&gt;Now everything works fine! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2016 22:36:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/org-apache-pig-piggybank-evaluation-xml-XPath/m-p/42302#M32966</guid>
      <dc:creator>Lentini1982</dc:creator>
      <dc:date>2016-06-24T22:36:10Z</dc:date>
    </item>
  </channel>
</rss>

