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 integerlong
: a signed 64-bit integerfloat
: a 32-bit floating pointdouble
: a 64-bit floating pointchararray
: a character array (string) in Unicode UTF-8 formatbytearray
: a byte array (blob)boolean
: a booleandatetime
: a datetimebiginteger
: a Java BigIntegerbigdecimal
: a Java BigDecimal
Pig supports the following complex data types:
map
: an associative array enclosed by[]
, with the ...
Get Learning Hadoop 2 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.