druid-io / pydruid

A Python connector for Druid
Other
506 stars 194 forks source link

`Dimension` object has no attribute `in_` #92

Open fufjvnvnf opened 7 years ago

fufjvnvnf commented 7 years ago

I'm doing virtually the same thing as the last example on the github page, where I try to create a filter with Dimension(something).in_([...]), but the error in the title showed up. Is this a problem with python version? I'm using 3.5.3. I've also checked that my pydruid version is 0.3.1.

dakra commented 7 years ago

Documentation seems to be pretty outdated. And looking through the history not sure if there ever was a in_ method on Dimension. Should be an easy patch but for now you can just use

filters.Filter(type='in', dimension='dim', values=['val1', 'val2', 'val3']))

ratb3rt commented 7 years ago

Bah - my bad, I removed the code for the _in syntax between the README changes and the PR...