|
|
-
how to filter empty string
Dan Yi 2013-02-26, 23:41
Hi,
I have data as following :
Timestamp itemid actiontype
"2012-11-01T23:59:59.000+0000" "" "Search" "2012-11-01T23:59:59.000+0000" "688531" "ShowItemDetail" ..
I want to filter out all the lines that have itemid as empty, I tried different approach but none of work:
C = FILTER B BY itemid != ''; C = FILTER B BY itemid != null; Anyone knows how to do it? Thanks.
+
Dan Yi 2013-02-26, 23:41
-
Re: how to filter empty string
Young Ng 2013-02-27, 01:12
C = FILTER B BY itemid is null;
you cant use == or != for null value
On Feb 26, 2013, at 3:41 PM, Dan Yi <[EMAIL PROTECTED]> wrote:
> Hi, > > I have data as following : > > Timestamp itemid actiontype > > "2012-11-01T23:59:59.000+0000" "" "Search" > "2012-11-01T23:59:59.000+0000" "688531" "ShowItemDetail" > .. > > I want to filter out all the lines that have itemid as empty, > I tried different approach but none of work: > > C = FILTER B BY itemid != ''; > C = FILTER B BY itemid != null; > > > Anyone knows how to do it? Thanks. > > > > >
+
Young Ng 2013-02-27, 01:12
-
Re: how to filter empty string
Dan Yi 2013-02-27, 01:16
Hi,Young,
I tried that one too, still won't work
On 2/26/13 5:12 PM, "Young Ng" <[EMAIL PROTECTED]> wrote:
>C = FILTER B BY itemid is null; > >you cant use == or != for null value > >On Feb 26, 2013, at 3:41 PM, Dan Yi <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> I have data as following : >> >> Timestamp itemid actiontype >> >> "2012-11-01T23:59:59.000+0000" "" "Search" >> "2012-11-01T23:59:59.000+0000" "688531" "ShowItemDetail" >> .. >> >> I want to filter out all the lines that have itemid as empty, >> I tried different approach but none of work: >> >> C = FILTER B BY itemid != ''; >> C = FILTER B BY itemid != null; >> >> >> Anyone knows how to do it? Thanks. >> >> >> >> >> >
+
Dan Yi 2013-02-27, 01:16
-
Re: how to filter empty string
Young Ng 2013-02-27, 01:21
try it on the console. load a small set of data, then dump it right away.
seems like you also need to handle "", if you are using the default loader On Feb 26, 2013, at 5:16 PM, Dan Yi <[EMAIL PROTECTED]> wrote:
> Hi,Young, > > I tried that one too, still won't work > > On 2/26/13 5:12 PM, "Young Ng" <[EMAIL PROTECTED]> wrote: > >> C = FILTER B BY itemid is null; >> >> you cant use == or != for null value >> >> On Feb 26, 2013, at 3:41 PM, Dan Yi <[EMAIL PROTECTED]> wrote: >> >>> Hi, >>> >>> I have data as following : >>> >>> Timestamp itemid actiontype >>> >>> "2012-11-01T23:59:59.000+0000" "" "Search" >>> "2012-11-01T23:59:59.000+0000" "688531" "ShowItemDetail" >>> .. >>> >>> I want to filter out all the lines that have itemid as empty, >>> I tried different approach but none of work: >>> >>> C = FILTER B BY itemid != ''; >>> C = FILTER B BY itemid != null; >>> >>> >>> Anyone knows how to do it? Thanks. >>> >>> >>> >>> >>> >> >
+
Young Ng 2013-02-27, 01:21
-
Re: how to filter empty string
Jinyuan Zhou 2013-02-27, 01:22
for null:
itemid is not null should be used On Tue, Feb 26, 2013 at 3:41 PM, Dan Yi <[EMAIL PROTECTED]> wrote:
> Hi, > > I have data as following : > > Timestamp itemid actiontype > > "2012-11-01T23:59:59.000+0000" "" "Search" > "2012-11-01T23:59:59.000+0000" "688531" "ShowItemDetail" > .. > > I want to filter out all the lines that have itemid as empty, > I tried different approach but none of work: > > C = FILTER B BY itemid != ''; > C = FILTER B BY itemid != null; > > > Anyone knows how to do it? Thanks. > > > > > > -- -- Jinyuan (Jack) Zhou
+
Jinyuan Zhou 2013-02-27, 01:22
|
|