Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

How to pass Columns itself as parameter in PIG scripts

$
0
0
Hello everyone,

In my PIG script i want to pass the column position as parameter, please
let me know how can i achieve that

a = load '$path' using PigStorage('');
b = group a by $CountColPos;
c = foreach b generate group,COUNT(a);
d = ORDER c by $0;
STORE d INTO '$TempCountDir';

Here how can i pass the value for $CountColPos, using the -p option from
comma

Thanks everyone.

*Regards,Barani*

Viewing all articles
Browse latest Browse all 5648

Trending Articles