Ojha, Pankaj 2013-06-14, 12:25
-Re: issue with IsEmpty UDF
Cheolsoo Park 2013-06-15, 22:53
Which version of Pig are you using? It works fine for me. I get the
following output as expected:
I tested Pig 0.9, 0.10, 0.11, and trunk. All worked for me.
On Fri, Jun 14, 2013 at 5:25 AM, Ojha, Pankaj <[EMAIL PROTECTED]>wrote:
> Hi Team,
> We are facing an issue when we use IsEmpty UDF with FILTER
> We have two input files:-
> Input File 1: - first
> Input File 2: - second
> Our requirement is , on grouping these two input files on the first two
> keys, it should give output only when data is present in both the files for
> a particular key otherwise it should print nothing.
> From the above input files, for key values (2,22), it should only print
> output like below :-
> To achieve this, we wrote the code as below:-
> first = LOAD 'first' USING PigStorage('|') as
> second = LOAD 'second' USING PigStorage('|') as
> cogroup_join = COGROUP first BY (a,b) , second BY (aa,bb);
> cogroup_join_filter = FILTER cogroup_join BY NOT IsEmpty(second) AND NOT
> dump cogroup_join_filter;
> But, the output for the cogroup_join_filter is:
> In my opinion, IsEmpty should have filtered out other values where it does
> not find corresponding key values same in both input file except for (2,22).
> But the same is not happening.
> Please have a look and provide your view on this.
> Thanks & Regards,
> Pankaj Ojha
> This message, including any attachments, is the property of Sears Holdings
> Corporation and/or one of its subsidiaries. It is confidential and may
> contain proprietary or legally privileged information. If you are not the
> intended recipient, please delete it without reading the contents. Thank