Reputation: 21
I have a relation in pig named 'A'
(name:gender:zip-code)
(x:m:1234)
(y:f:1234)
(z:m:1245)
(s:f:1235)
How can I get the number of rows in relation A?
I want to get the result as 4.
Upvotes: 2
Views: 2458
Reputation: 11090
Assuming your relation is named A.
B = GROUP A ALL;
B_COUNT = FOREACH B GENERATE COUNT(A);
DUMP B_COUNT;
Upvotes: 3