Getting an error on running HCatalog Getting an error on running HCatalog hadoop hadoop

Getting an error on running HCatalog


As stated by GoBrewers14 you must start pig with -useHCatalog. If you are running a Pig script an alternative is to determine the location of the HCatalog jar and add a REGISTER statement with the path of the jar to the top of your script

Example:

REGISTER /home/user/Installations/hive-0.11.0-bin/hcatalog/share/hcatalog/hcatalog-core-0.11.0.jar;

of course your path/version may be different.


I was facing the same issue, fixed it as following:Start pig using "-useHCatalog" option.

pig -useHCatalog

then try :A = LOAD 'eventnew.txt' USING HCatalogLoader();


You can now launch pig shell just by using command to use HCatalog-

pig -useHCataloggrunt> a = load 'table' using org.apache.hive.hcatalog.pig.HCatLoader();