May 26, 2021 Apache Pig
Apache Pig offers a variety of built-in functions, namely eval, load, store, math, string, bag, and tuple functions.
Here's a list of the eval functions provided by Apache Pig.
S.N. | Functions and descriptions |
---|---|
1 |
AVG()
Calculates the average of the values in the package. |
2 |
BagToString()
Connect the elements of the package into strings. /b10> When connecting, we can place separators (optional) between these values. |
3 |
CONCAT()
Connect two or more expressions of the same type. |
4 |
COUNT()
Gets the number of elements in the package and calculates the number of yuan in the package. |
5 |
COUNT_STAR()
It is similar to the COUNT() function. /b10> It is used to get the number of elements in the package. |
6 |
DIFF()
Compare the two packages (fields) in the metagroup. |
7 |
IsEmpty()
Check that the package or map is empty. |
8 |
MAX()
Calculates the maximum value of a column (value or character) in a single column package. |
9 |
MIN()
To get the minimum (minimum) value (number or character) for a particular column in a single column package. |
10 |
PluckTuple()
Using Pig Latin's PluckTuple() function, you can define the string Prefix and filter the columns in the relationship that begin with a given prefix. |
11 |
SIZE()
The number of elements is calculated based on any Pig data type. |
12 |
SUBTRACT()
The two packages subtract, it takes two packages as input, and returns a package that contains the groups that are not in the second package in the first package. |
13 |
SUM()
To get the sum of the values for a column in a single column package. |
14 |
TOKENIZE()
To split a string in a single group that contains a set of words and return a package that contains the output of the split operation. |