Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Hadoop 2

You're reading from   Learning Hadoop 2 Design and implement data processing, lifecycle management, and analytic workflows with the cutting-edge toolbox of Hadoop 2

Arrow left icon
Product type Paperback
Published in Feb 2015
Publisher Packt
ISBN-13 9781783285518
Length 382 pages
Edition 1st Edition
Tools
Arrow right icon
Toc

Table of Contents (13) Chapters Close

Preface 1. Introduction FREE CHAPTER 2. Storage 3. Processing – MapReduce and Beyond 4. Real-time Computation with Samza 5. Iterative Computation with Spark 6. Data Analysis with Apache Pig 7. Hadoop and SQL 8. Data Lifecycle Management 9. Making Development Easier 10. Running a Hadoop Cluster 11. Where to Go Next Index

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 key and value separated by #, and items separated by ,

  • tuple: an ordered list of data, where elements can be of any scalar or complex type enclosed by (), with items separated by ,

  • bag: an unordered collection of tuples enclosed by {} and...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime