You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by rakesh sharma <ra...@hotmail.com> on 2016/08/26 11:50:47 UTC

Filter with string not working

Hi All


I am trying to do a filter of a csv file.

the statement is

A = filter B by ($0 == 'type');

dump A;


but it doesnt return anything, I have faced this issue before as well. Is there any setting that I need to set.


thanks

rakesh

Re: Filter with string not working

Posted by rakesh sharma <ra...@hotmail.com>.
Hi Haley


I have loaded it using PigStorage(',').

Donno if I have to explicitly mention the schema while loading


thanks

rakesh

________________________________
From: Haley Miller <ha...@gmail.com>
Sent: Friday, August 26, 2016 5:42:08 PM
To: user@pig.apache.org
Subject: Re: Filter with string not working

Assuming you are using pig loader since you didn't mention it. I believe it
uses tab delimiters by default, so make sure your load statement is
specifying the comma.

On Aug 26, 2016 6:51 AM, "rakesh sharma" <ra...@hotmail.com> wrote:

> Hi All
>
>
> I am trying to do a filter of a csv file.
>
> the statement is
>
> A = filter B by ($0 == 'type');
>
> dump A;
>
>
> but it doesnt return anything, I have faced this issue before as well. Is
> there any setting that I need to set.
>
>
> thanks
>
> rakesh
>

Re: Filter with string not working

Posted by Haley Miller <ha...@gmail.com>.
Assuming you are using pig loader since you didn't mention it. I believe it
uses tab delimiters by default, so make sure your load statement is
specifying the comma.

On Aug 26, 2016 6:51 AM, "rakesh sharma" <ra...@hotmail.com> wrote:

> Hi All
>
>
> I am trying to do a filter of a csv file.
>
> the statement is
>
> A = filter B by ($0 == 'type');
>
> dump A;
>
>
> but it doesnt return anything, I have faced this issue before as well. Is
> there any setting that I need to set.
>
>
> thanks
>
> rakesh
>