This is the documentation for CDH 4.6.0.
Documentation for other versions is available at Cloudera Documentation.

Accessing Table Data with Pig

When using table information from the Hive metastore with Pig, add the -useHCatalog option when invoking pig:

$ pig -useHCatalog test.pig

In the script, use HCatLoader to have table schema retrieved automatically:

A = LOAD 'groups' USING org.apache.hcatalog.pig.HCatLoader(); 


A: {name: chararray,placeholder: chararray,id: int}