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

querying not empty tag value in v0.10 #6460

Closed
RoCat opened this issue Apr 25, 2016 · 1 comment
Closed

querying not empty tag value in v0.10 #6460

RoCat opened this issue Apr 25, 2016 · 1 comment

Comments

@RoCat
Copy link

RoCat commented Apr 25, 2016

Hi,
I have a db with one measurement and multiple tags

For some reasons, sometimes one of these tags is set and sometimes it isn't (I don't know if it is null or empty or '' or something else)

If I request my measurement with
select distinct(hit) from myMeasurement group by myTag
here is the answer:

name: myMeasurement
tags: myTag=
time    distinct
----    --------
0   [1]


name: myMeasurement
tags: myTag=http://exemple.com/samples/coca.png
time    distinct
----    --------
0   [1]

I cannot figure out how to query only if these tag value is set.
I use InfluxDB v0.10.3 (git: 0.10.0 f55169e, built 2016-03-09T17:13:16.236131) and Isaw that since influxDB 0.9 we cannot have null value, so I assume it is not null but something else.
I tried:
where myTag <> null
where myTag <> ''
where myTag

The only way to get what I want is
where myTag =~ //

But this seems not a good solution to me, not sure about how index are used with such regexp.
I'm not sure it is a bug but it seems strange to me to have kind of null values and cannot query them in the same time.

@RoCat
Copy link
Author

RoCat commented Apr 25, 2016

seems to be duplicate of
#6283

@RoCat RoCat closed this as completed Apr 25, 2016
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

1 participant