-
Notifications
You must be signed in to change notification settings - Fork 524
Filter by tags appears to be broken? #251
Comments
Also related, the whole handling of tags doesn't appear to work correctly: I have a measurement called 'current'.
This correctly shows one tag called "imei". I can find the tag values inside current using:
Clearly showing a working tag called "imei" and 4 different tagValues.
But if I use the
According to the docs |
On 13/10/15 10:37 AM, David McLean wrote:
Hello David,
Absolutely, and this has nothing to do with influxbd-python. The InfluxDB server does not return tags if you don't ask it to. However, this can be misguiding because there was a recent change to the InfluxDB API: The implicit GROUP BY * that was added to every SELECT * has been The "tags" that you see in #251 are actually columns! The fact that tags are now part of the columns makes if impossible for us to differentiate tags and columns :(!
It should work when using "group by", I cannot break that. What I am getting out of this is that there are no bugs in influxdb-python. To get things working like you want, all you have to do is request the right tags by using the "GROUP BY" keyword. So, there are two types of tags:
However, it looks like one would want to filter by the tags that are now included in the columns. What do you think? Once again, I think that this discussion should be on GitHub so that everyone can see, I will post this here: thank you for your work David Best regards, Alexandre Viau |
Hi Alex, The above makes sense although it should be noted that the "bug" is now just that the documentation is no longer accurate. In the current docs the following:
Is suggested as working code but due to the API changes it runs without error but no longer filters correctly, something which is a bit confusing for the first-time user! I think its possible to implement filtering by tags included in the columns but I'm not sure how to do so in a way which maintains the previously functionality on group by queries but doesn't break other parts of the library. I'll remove my pull request as it neither solves the problems correctly nor passes the build! |
You are right! That is a bug :)
I'll think about this, we should use this issue to discuss how to do that. |
We had the same problem :( With NO tags (works)
With EMPTY tags (works)
With ANY specific tags (does NOT works)
etc |
Hi, |
Hi, def filter_data(data, fitered_tags): now all we need to filter is to pass the data_list into filter_data function and pass tags(dict) so that it will filter all the data and return you list of dict elements. |
this bug has been resolved now? |
This bug should be fixed in the latest release -- if not, we can revisit. |
I've written some data points (listed at the bottom) to my instance in a measurement called 'abc':
I can get the data-points out:
And print them:
When I specify the tag value the result is empty:
Data Points:
The text was updated successfully, but these errors were encountered: