Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

to load hive table to a pig iteration by hcatloader class

to load hive table to a pig iteration by hcatloader class

New Contributor

I am trying to load the same Hive table to a Pig Iteration and i am using the same class like whatever you had used in the video and it was giving me an error.

a = load 'flightdelays' using org.apache.hive.hcatalog.pig.HCatLoader();

Error details :

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.]

Can you please let me know how to reslove this?

4 REPLIES 4

Re: to load hive table to a pig iteration by hcatloader class

New Contributor

this is for a certification question no 5 in the practice test for HDPD exam and i am using aws instance

Re: to load hive table to a pig iteration by hcatloader class

New Contributor

Better you write the command in script file and execute it using pig -x -useHCatalog.

Re: to load hive table to a pig iteration by hcatloader class

New Contributor

No Prateek....I have done that but there seems to be some issue....it should work for both the ways in the script or away on the CLI.... But it didn't

Highlighted

Re: to load hive table to a pig iteration by hcatloader class

Expert Contributor

Hi Lalith,

I guess you didn't specified "-useHCatalot" in your script. Option "-useHCatalog" is not specified when starting pig.

Please refer this link for more info.

http://www.openkb.info/2014/11/failed-to-load-hive-table-in-pig-using_27.html

Don't have an account?
Coming from Hortonworks? Activate your account here