Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: remove broken link to old doc

...

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.

...

  • map – key type should be string
  • List<ARRAY<any type>
  • struct<any type fields>

...

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.

...

 

Hive TypePig Type
map
(key type should be string)
map
List<ARRAY<any type>bag
struct<any type fields>tuple

 

 

Panel
titleColorindigo
titleBGColorsilver
titleNavigation Links

Previous: HCatalog Configuration Properties
Next: Input and Output Interfaces

General: HCatalog ManualWebHCat ManualHive Wiki HomeHive Project Site
Old version of this document (HCatalog 0.5.0): Load and Store Interfaces