Site icon i2tutorials

Pig Latin – Combining and Splitting

Pig Latin – Combining and Splitting:

SPLIT:

Partitions a relation into two or more relations.

SPLIT A INTO X IF f1<7, Y IF f2==5, Z IF (f3<6 OR f3>6);

 

UNION:

Computes the union of two or more relations.

Does not preserve the order of tuples, does not ensure (as databases do) that all tuples adhere to the same schema or that they have the same number of fields

X = UNION A, B;
Exit mobile version