Chhaya Vishwakarma
Chhaya Vishwakarma

Reputation: 1437

Reading hive table using Pig script

I am trying to read hive table using PIG script but when I run a pig code to read a table in hive its giving me following error:

2014-02-12 15:48:36,143 [main] WARN org.apache.hadoop.hive.conf.HiveConf  
    -hive-site.xml not found on CLASSPATH 2014-02-12 15:49:10,781 [main] ERROR
    org.apache.pig.tools.grunt.Grunt - ERROR 2997:  Unable to recreate
    exception from backed error: Error: Found class 
    org.apache.hadoop.mapreduce.TaskAttemptContext, but interface was expected

(Ignore newlines and whitespace added for readability)

Hadoop version 1.1.1

Hive version 0.9.0

Pig version 0.10.0

    Pig code
    a = LOAD '/user/hive/warehouse/test' USING 
    org.apache.pig.piggybank.storage.HiveColumnarLoader('name string');

Is it due to some version mismatch ?

Upvotes: 0

Views: 4866

Answers (1)

hjamali52
hjamali52

Reputation: 1135

Why can't you use hcatalog to access hive metadata in pig?
Check this for an example

Upvotes: 1

Related Questions