Errata

Programming Pig

Errata for Programming Pig

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Other Digital Version http://chimera.labs.oreilly.com/books/1234000001811/ch01.html#pig_hello_world

"Input" is now a reserved word in Pig; this example uses it as the name of an array and crashes everything, on a beginner's very first test script!

Gavin Leech  Sep 14, 2016 
PDF Page 20
United States

In the Grunt example, it explains you can reuse the same alias and Pig will take the last instance of the line you enter, but in the example,

...
grunt> symbols = foreach dividends generate symbl;
...Error during parsing. Invalid alias: symbl ...
grunt> symbols = foreach A generate symbol;
...

It looks like A was used in the original example as the alias, and was changed to dividends, but not changed in the 2nd line.

Eric Kangas  Jul 23, 2013 
PDF Page 51
First paragraph of the User Defined Functions section

"Much of the power of Pig lies in its ability to let users combine irs operators with their own or others’ code via UDFs" phrase seems to have a typo in "irs", which should be "its".

David Faria  Jul 23, 2015 
Printed Page 84
Figure 7-4

second to the bottom box: grpd: CoGroup -> avgdiv: ForEach
bottom box: svgdiv -> avgdiv

Anonymous  Feb 10, 2014 
PDF Page 168
4th paragraph (code example)

The example gives the parameter to HBaseStorage as 'user_info:name, user_info:email, links:*' however this function splits on just a whitespace, so the commas shouldn't be there.

Corrected line:

store user_links into 'hbase://users'
using org.apache.pig.backend.hadoop.hbase.HBaseStorage(
'user_info:name user_info:email links:*');

Barnaby Gray  Nov 16, 2011