pass list of values into filter

Hello Druid Gurus,

Can you please let me know how to pass list of values into “value” in filter object. In nutsell i would like to replicate the sql

**where merch_key in ( 1,2,3,4,5,6) **

Can you please help?


You can use multiple selection filters in an OR filter

The corresponding part in your druid query would look like this:

“filter” :{ “type” : “or”,
“fields”: [
{“filter”: “selector”, “dimension”: “merch_key”, “value”: “1”},
` {“filter”: “selector”, “dimension”: “merch_key”, “value”: “2”},



I made a little error. :confused: The key befor selector must be “type”. I need to finish my good morning coffee.
{"type": "selector", "dimension": "merch_key", "value": "1"}


Thank You Fangjin and Martin. Had the same-thing in mind but was thinking may be there is an easier way then mentioning in each line of selector.

Fangjin and Martin,

i have been struggling with below where clause in druid. can you please help?

MERCH_KEY = 3700

and not a.rcvr_id in ( '143180 ','12009 ')

i was able to successfully implement

MERCH_KEY = 3700

and a.rcvr_id in ( '143180 ','12009 ')


Ok i figured this out. i was passing an array into “type”:“not” which i shouldnt have