On 26 January 2016 at 15:59, Divya Gehlot wrote:
> Hi Prashant ,
> Thanks for your solution.
> But got stuck in one more issue .
> How do I pass this tuple to group by function
>
> I tried passing it
> getting below error
>
> grunt> Load_cfl = LOAD '/user/hdfs/pig/data/cfl.txt' USING PigStorage('
Does this solve it?
grunt> DATA = LOAD 'data' USING PigStorage('|') as (groupBy:chararray ,
condition :chararray);
grunt> FILTERED = FILTER DATA BY condition == 'Y';
grunt> GROUPED = GROUP FILTERED BY condition;
grunt> TUPLED = foreach GROUPED generate
FLATTEN(BagToTuple(FILTERED.groupBy));
gr
Hi,
I have file data as below
Data is dynamic
Column1 | Y
Column2 | N
Column3 |Y
Column4| Y
Column5|N
I need to filter the data which is Y and then
read those columns as tuple so that I can pass to my Groupby function
Filter data
Column1,Y
Column3,Y
Column4,Y
and then cnvert column1,column3,col