Member since
06-24-2016
2
Posts
0
Kudos Received
1
Solution
My Accepted Solutions
Title | Views | Posted |
---|---|---|
3239 | 06-24-2016 03:36 PM |
06-24-2016
03:36 PM
Fixed it 🙂 It seems that the Cloudera deployment of the Piggybank.jar does not containt the xpath functionality (or any xml functionality at all). See: http://grepcode.com/project/repository.cloudera.com/content/repositories/releases/org.apache.pig/piggybank I downloaded piggybank.jar 0.15.0 from https://mvnrepository.com/artifact/org.apache.pig/piggybank/0.15.0 put it in /home/ubuntu and used it in my script. 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 INTO 'Output/B' USING PigStorage(); Now everything works fine! 🙂
... View more
06-24-2016
01:44 PM
I'm creating a PIG query running on Hue. The first part of my query does run: REGISTER piggybank.jar A = LOAD '/durocan/staging/installationconfigs/InstallationConfigExample.xml' using org.apache.pig.piggybank.storage.XMLLoader('Installation') as (x:chararray); The second part fails: B = FOREACH A GENERATE org.apache.pig.piggybank.evaluation.xml.XPath(x, 'Installation/Durocan/Sensors/Sensor/Name'); dump B; Error: Could not resolve org.apache.pig.piggybank.evaluation.xml.XPath How is it possible that org.apache.pig.piggybank.storage.XMLLoader get's resolved and org.apache.pig.piggybank.evaluation.xml.XPath is not?
... View more
Labels:
- Labels:
-
Apache Pig
-
Cloudera Hue