1.

How do you differentiate inner bag and outer bag in Pig.

Answer»
Inner BagOUTER Bag
An inner bag just Contains a bag inside a tuple.An outer bag which is also called a relation is NOTHING but a bag of TUPLES.
Example : (4,{(4,2,1),(4,3,3,)})
In this example the complete relation is an outer bag and {(4,2,1),(4,3,3,)} is an inner bag.
Example:{(park, New York),(Hollywood, Los Angeles)} Which is a bag of tuples, nothing but an outer bag.
An inner bag is a relation inside any other bag.In an outer bag, relations are SIMILAR to relations in relational databases.


Discussion

No Comment Found