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
Load_cfl = LOAD '/user/hdfs/file.txt' USING PigStorage('|') as
(code:chararray,book_code:int,currency_code:chararray,start_
date:datetime,end_date:datetime,type:chararray,amount:double
);
...
cfl_grp = GROUP Load_cfl BY (*flatn_col*);
I don't see a column "*flatn_col" *in cfl_grp. Typo?
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
Hi,
The file Groupby_condition.txt looks like below where data is seperated by |
Column1|Y
Column2|N
Column3|Y
On 26 January 2016 at 07:17, Prashant Kommireddi
wrote:
> You are flattening a scalar column "groupBy". What does the file
> "GroupBy_Condition" look like? I'm guessing you want to loa
You are flattening a scalar column "groupBy". What does the file
"GroupBy_Condition" look like? I'm guessing you want to load that as a
bag/tuple before flattening, but you're reading as a chararray instead.
On Monday, January 25, 2016, Divya Gehlot wrote:
> Hi,
> I have two files
> Group_condit
Hi,
I have two files
Group_condition.txt
Colun1|Y
Column2|N
Column3|Y
Load_cfl = LOAD '/user/hdfs/file.txt' USING PigStorage('|') as
(code:chararray,book_code:int,currency_code:chararray,start_date:datetime,end_date:datetime,type:chararray,amount:double
);
Load_GroupBy = LOAD '/user/hdfs/Groupby_C
Hi,
I have two files
File1
Group by Condition
Field1 Y
Field 2 N
Field3 Y
File2 is data file having field1,field2,field3 etc..
field1 field2 field3 field4 field5
data1 data2 data3 data4 data 5
data11 data22 data33 data44 data 55
Now my requirement is to group b