O'Reilly logo

Learning Hadoop 2 by Garry Turkington, Gabriele Modena

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Programming Pig

Pig Latin comes with a number of built-in functions (the eval, load/store, math, string, bag, and tuple functions) and a number of scalar and complex data types. Additionally, Pig allows function and data-type extension by means of UDFs and dynamic invocation of Java methods.

Pig data types

Pig supports the following scalar data types:

  • int: a signed 32-bit integer
  • long: a signed 64-bit integer
  • float: a 32-bit floating point
  • double: a 64-bit floating point
  • chararray: a character array (string) in Unicode UTF-8 format
  • bytearray: a byte array (blob)
  • boolean: a boolean
  • datetime: a datetime
  • biginteger: a Java BigInteger
  • bigdecimal: a Java BigDecimal

Pig supports the following complex data types:

  • map: an associative array enclosed by [], with the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required