/    /  Pig Latin – Other Operators

Pig Latin – Other Operators

DESCRIBE:

Returns the schema of an alias.

EXPLAIN:

Displays execution plans.

Use the EXPLAIN operator to review the logical, physical, and map reduce execution plans that are used to compute the specified relationship.

ILLUSTRATE:

Note – This feature is NOT maintained at the moment.

Displays a step-by-step execution of a sequence of statements.

REGISTER:

Registers a JAR file so that the UDFs in the file can be used.

REGISTER /src/myfunc.jar;

 

FLATTEN:

It is an operator which changes the structure of tuples and bag. Flatten un-nests tuples as well as bags.

X = FOREACH C GENERATE group, FLATTEN(A);

X = FOREACH C GENERATE GROUP, FLATTEN(A.name);