HI,
I found a wired behaviour using the regex in FROM clause.
I have two tables:
Focke 11_Focke.Data.L1.M1.CurrentBuffer.LastUpdate
Focke 11_Focke.Data.L1.M1.CurrentBuffer.LineNo
These are two queries:
influx -execute ‘SELECt value FROM /Focke 11_Focke.Data.L1.M1.CurrentBuffer.La/’ -database xxxx | grep name
output:
name: Focke 11_Focke.Data.L1.M1.CurrentBuffer.LastUpdate
the same as of the first query but without the last character in FROM
influx -execute ‘SELECt value FROM /Focke 11_Focke.Data.L1.M1.CurrentBuffer.L/’ -database xxxx | grep name
output:
name: Focke 11_Focke.Data.L1.M1.CurrentBuffer.LineNo
Why the second query doesn’t return both the two?
Thanks in advance
I’m not able to reproduce your issue. This works for me:
> insert Focke\ 11_Focke.Data.L1.M1.CurrentBuffer.LineNo value=44
> insert Focke\ 11_Focke.Data.L1.M1.CurrentBuffer.LastUpdate value=42
> select * from /Focke 11_Focke.Data.L1.M1.CurrentBuffer.L/
name: Focke 11_Focke.Data.L1.M1.CurrentBuffer.LastUpdate
time value
---- -----
1529935658151175000 42
name: Focke 11_Focke.Data.L1.M1.CurrentBuffer.LineNo
time value
---- -----
1529935638212473100 44
>
Thanks for your response.
I think that my issue is the data type of the field “value”: in one measurement is Number but in the other is String. So when the regex is more permissive InfluxDB is not able to list value of different type.
It is possible?
Thanks
This looks like a bug. I’ve submitted an issue on GitHub:
opened 01:40PM - 27 Jun 18 UTC
closed 10:24PM - 03 Jul 18 UTC
area/queries
kind/bug
__System info:__ InfluxDB 1.5.3, multiple OSes.
__Steps to reproduce:__ From … the `influx` CLI:
```
> use regexTest
Using database regexTest
> insert m1 value=42i
> insert m2 value=42
> insert m3 value="Answer to the Ultimate Question of Life, the Universe, and Everything"
> insert m4 value=True
> select * from /m/
name: m1
time value
---- -----
1530106663275592500 42
name: m2
time value
---- -----
1530106670931703700 42
> insert n1 value="A. Dent"
> insert n2 value=True
> select * from /n/
name: n1
time value
---- -----
1530106708876645200 A. Dent
>
```
__Expected behavior:__ [What you expected to happen]
Should return all measurements where the measurement name matches the regular expression.
__Actual behavior:__ [What actually happened]
Only returns measurements with fields that have a specific type; if there are numeric types present, only numeric types are returned. If only booleans and strings are present, only strings are returned.