In InfluxDB, how can I create a list of strings/values by using a "SELECT" statement or any other "query" ?
My question is same as this question: mysql fake select
But, for Influxdb
.
I'm using latest version of InfluxDB which is 1.2.4
In InfluxDB, how can I create a list of strings/values by using a "SELECT" statement or any other "query" ?
My question is same as this question: mysql fake select
But, for Influxdb
.
I'm using latest version of InfluxDB which is 1.2.4
As of now , there is no IN operator support in influxdb .
Lets say I want to run the query like this -
select value from measurement where key in ('903','965' ,'890') group by key limit 10 offset 0;
this can be done in a way like these -
OR
select value from measurement where key='903' or key='965' or key='890' group by key limit 10 offset 0;
Regex
select value from measurement where key=~ /^903$|^965$|^890$/ group by key limit 10 offset 0;
However, the above way is unindexed , so I will update my answer once influxdb start supporting IN
operator .
Let me know , if this way around does not work for you and I will try to update it .