Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"in" filter not working #33

Open
Shabhana opened this issue Aug 28, 2019 · 5 comments
Open

"in" filter not working #33

Shabhana opened this issue Aug 28, 2019 · 5 comments

Comments

@Shabhana
Copy link

Shabhana commented Aug 28, 2019

Tried adding "in" filter to the druid-query as below,
client.filter('in', 'txn_mth', ['2019/01','2019/02'])

But the below error


/Users/srajathii/Documents/hikma/Site/node_modules/druid-query/lib/fields/filter.js:23
    throw new FieldError('Bad filter type: ' + type)
    ^

Error: Bad filter type: in
    at filter (/Users/srajathii/Documents/hikma/Site/node_modules/druid-query/lib/fields/filter.js:23:11)
    at GroupByQuery.proto.(anonymous function) [as filter] (/Users/srajathii/Documents/hikma/Site/node_modules/druid-query/lib/query.js:136:34)
    at Object.<anonymous> (/Users/srajathii/Documents/hikma/Site/bin/www:205:4)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Function.Module.runMain (module.js:694:10)
    at startup (bootstrap_node.js:204:16)

Can you please help on this?

@Shabhana Shabhana changed the title in filter not working "in" filter not working Aug 28, 2019
@jkukul
Copy link
Contributor

jkukul commented Aug 28, 2019

I think this is simply not supported? I think it's already reported in #26.

@Shabhana
Copy link
Author

Shabhana commented Aug 28, 2019

But looks "in" filter is added as part of commit feat(fields/filter): add in the filter type

also in documentation mentioned like below:


Query.filter('in', dimension, values)

dimensions string - Dimension to which filter is applied.
values object[] - Values to match.

@jkukul @estliberitas @nothinking

@Shabhana
Copy link
Author

@estliberitas
commit 0310068 is not published to the latest npm version "druid-query": "2.1.0" ?

@jkukul
Copy link
Contributor

jkukul commented Aug 28, 2019

@Shabhana Yes, it looks like this. This commit was added after last release. You can always install from github though.

@Shabhana
Copy link
Author

@jkukul I need productionalise my application, so can use only modules from npm registry. any help here is much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants