Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: fix internal link to Running Pig with HCatalog (using heading name, not anchor); trivial edits

...

Note
titleStale Content Warning

The fully qualified package name changed from org.apache.hcatalog.pig to org.apache.hive.hcatalog.pig in Pig versions 0.14+. 

In many older web site examples you may find references to the old syntax which no longer functions.

Previous Pig Versions0.14+
org.apache.hcatalog.pig.HCatLoaderorg.apache.hive.hcatalog.pig.HCatLoader
org.apache.hcatalog.pig.HCatStorerorg.apache.hive.hcatalog.pig.HCatStorer

...

No Format
A = LOAD 'tablename' USING org.apache.hive.hcatalog.pig.HCatLoader();

 

Assumptions

You must specify the table name in single quotes: LOAD 'tablename'. If you are using a non-default database you must specify your input as 'dbname.tablename'. If you are using Pig 0.9.2 or earlier, you must create your database and table prior to running the Pig script. Beginning with Pig 0.10 you can issue these create commands in Pig using the SQL command.  Details of Pig syntax can be found in PIG-2482.

...

Info
titleNote

Hive does not have a data type corresponding to the big integer type in Pig.

...

Running Pig with HCatalog

Pig does not automatically pick up HCatalog jars. To bring in the necessary jars, you can either use a flag in the pig command or set the environment variables PIG_CLASSPATH and PIG_OPTS as described below.

...