Support Questions
Find answers, ask questions, and share your expertise

Not able to load data from Hcatalog into Pig Alias.

New Contributor

The below are the vesrions i am using.

Hadoop Version: Hadoop 2.2.0

Apache Pig version 0.12.1-SNAPSHOT (rexported)

Hive 0.13.1

My Issue:

I am trying to run below cmd in Pig Grunt shell.

grunt> a = LOAD 'batting_data' USING org.apache.hive.hcatalog.pig.HCatLoader();

Error:

2016-08-27 18:52:51,670 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1070: Could not resolve org.apache.hive.hcatalog.pig.HCatLoader using imports: [, java.lang., org.apache.pig.builtin., org.apache.pig.impl.builtin.] Details at logfile: /home/edureka/pig_1472348224417.log

And then i executed the below one.

[edureka@localhost ~]$ pig -useHCatalog

Error:

[edureka@localhost ~]$ pig -useHCatalog ls: cannot access /usr/lib/hive-0.13.1-bin/lib/slf4j-api-*.jar: No such file or directory Please initialize HCAT_HOME

Can any one share the root cause please.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Not able to load data from Hcatalog into Pig Alias.

Mentor
@Vamsi C

since you're using an old version of Hive and Pig, you should change your script to

a = LOAD 'batting_data' USING org.apache.hcatalog.pig.HCatLoader();

the HCatLoader was renamed in later versions of Pig and hcatalog was merged into Hive project.

View solution in original post

1 REPLY 1

Re: Not able to load data from Hcatalog into Pig Alias.

Mentor
@Vamsi C

since you're using an old version of Hive and Pig, you should change your script to

a = LOAD 'batting_data' USING org.apache.hcatalog.pig.HCatLoader();

the HCatLoader was renamed in later versions of Pig and hcatalog was merged into Hive project.

View solution in original post