nexr / RHive

RHive is an R extension facilitating distributed computing via Apache Hive.
http://nexr.github.io/RHive
122 stars 63 forks source link

quering SerDe tables #54

Open sashaostr opened 10 years ago

sashaostr commented 10 years ago

I have a table created using "ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe';". While rhive.query("SELECT * FROM serdetable") works, selecting special column rhive.query("SELECT col1 FROM serdetable") returns Error: java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask. I tried to run the same query directly from hive shell and it works - which means that the jar that contains org.openx.data.jsonserde.JsonSerDe class was loaded by the hive. I have to mention that trying on other table created with default Regex SerDe returns the same error. Any help would be appriciated!

Joy-Jiao commented 10 years ago

Hi , I have this problem too in Hive not RHive, you can have a test on hive,if the problem comes out the same before,you need check your system role whether it has the permission to do so.

At 2014-01-29 00:46:51,sashaostr notifications@github.com wrote:

I have a table created using "ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe';". While rhive.query("SELECT * FROM serdetable") works, selecting special column rhive.query("SELECT col1 FROM serdetable") returns Error: java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask. I tried to run the same query directly from hive shell and it works - which means that the jar that contains org.openx.data.jsonserde.JsonSerDe class was loaded by the hive. I have to mention that trying on other table created with default Regex SerDe returns the same error. Any help would be appriciated!

¡ª Reply to this email directly or view it on GitHub.

jarviejohns commented 8 years ago

You could try the following - rhive.query("ADD JAR serde-jar-file") rhive.query("select * from tabname")

where, serde-jar-file is the path to the jar file containing the SerDe tabname is the name of the table that was created with, say, a json SerDe