how to filter for not null dimensions?

3,291 views
Skip to first unread message

Prashant Deva

unread,
Sep 1, 2014, 6:04:25 PM9/1/14
to druid-de...@googlegroups.com
I want to filter out dimensions that have null value in my query.
I dont see a 'not null' filter. How do i achieve this?

Nishant Bangarwa

unread,
Sep 2, 2014, 12:35:27 AM9/2/14
to druid-de...@googlegroups.com
Hi Prashant, 

you can filter by specifying an empty value for filtering null values. 
e.g. - 
   "type" : "not", 
    "field" :  { 
                   "type" : "selector", 
                   "dimension" : "dimension_name", 
                   "value" : ""
                  } 



On Tue, Sep 2, 2014 at 3:34 AM, Prashant Deva <prasha...@gmail.com> wrote:
I want to filter out dimensions that have null value in my query.
I dont see a 'not null' filter. How do i achieve this?

--
You received this message because you are subscribed to the Google Groups "Druid Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to druid-developm...@googlegroups.com.
To post to this group, send email to druid-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/druid-development/9819f4a0-cf02-4452-83da-cc3bdcc3eae0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Prashant Deva

unread,
Sep 2, 2014, 12:42:16 AM9/2/14
to druid-de...@googlegroups.com
Looking around on this group, it seems checking for null dimentions values is extremely buggy in druid:

That post is from a while back.
Are things much more stable now in this regard?
Or are those posts talking of something else entirely and this (your answer query) was always stable to begin with?

Prashant Deva

unread,
Sep 2, 2014, 3:26:05 PM9/2/14
to druid-de...@googlegroups.com
can someone please respond to this

Nishant Bangarwa

unread,
Sep 2, 2014, 11:35:11 PM9/2/14
to druid-de...@googlegroups.com
Hi Prashant, 

Druid internally treats null values and empty strings as same, 
There has been some inconsistency in handling of null values at some places, fixing that is in roadmap for 0.7.x. 
For more info on the fixes you can follow - https://github.com/metamx/druid/issues/665



For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages