Things under legendu
Tips¶
Pig uses
--(at the beginning of lines) to comment out lines. It also support C-style comment, i.e., using/* ... */Filter out records that you don’t want before you do expensive transformations such as joining, crossing, etc.
Pig uses single quotes instead of double quotes for strings.
prefer filtering and then joining rather than joining and then filtering
Use dot/period to access fields when use aggregation functions, otherwise, use double colons (::) to access fileds/columns. but this is wierd
-p or -param
Common Mistakes¶
forget to assign relation to a name
use lower case of functions
use double quotes for strings